Method ExhaustiveTaggedComponentSearch
ExhaustiveTaggedComponentSearch<T>(GameObject, string)
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 ExhaustiveTaggedComponentSearch<T>(GameObject desiredSource, string tag) where T : Component
Parameters
Type | Name | Description |
---|---|---|
GameObject | desiredSource | The GameObject we expect to be a parent or owner of the component |
string | tag | The tag this component must have to match |
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 |