Click or drag to resize

TypeHelperCanAddAsComponent Method

[This is preliminary documentation and is subject to change.]

Gets a value indicating whether the specified Type can be added to a GameObject as a component.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static bool CanAddAsComponent(
	this Type type,
	bool allowEmptyComponentMenu = true
)

Parameters

type
Type: SystemType
The type to check.
allowEmptyComponentMenu (Optional)
Type: SystemBoolean
Whether to allow the component type if its AddComponentMenu attribute specifies an empty component menu name, meaning the component won't show up in the Add Component menu.

Return Value

Type: Boolean
if the specified type can be added to a GameObject as a component; otherwise, .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also