Method ExhaustiveComponentSearch
ExhaustiveComponentSearch<T>(GameObject)
Searches for a component in a scene with a 3 step process, getting more comprehensive with each step At edit time will find all objects in the scene, even if they are disabled At play time, will be unable to find disabled objects that are not a child of desiredSource
Declaration
public static T ExhaustiveComponentSearch<T>(GameObject desiredSource) where T : Component
Parameters
Type | Name | Description |
---|---|---|
GameObject | desiredSource | The Game Object we expect to be a parent or owner of the component |
Returns
Type | Description |
---|---|
T | A component of the desired type, or NULL if no component was located |
Type Parameters
Name | Description |
---|---|
T | The type of component to find in the scene |