Method GetComponentInScene
GetComponentInScene<T>(Scene)
Retrieves the first component of the given type in a scene
Declaration
public static T GetComponentInScene<T>(Scene scene) where T : Component
Parameters
| Type | Name | Description |
|---|---|---|
| Scene | scene | The scene to search |
Returns
| Type | Description |
|---|---|
| T | The first component found in the active scene, or null if none exists |
Type Parameters
| Name | Description |
|---|---|
| T | The type of component to retrieve |