Class SceneExtensions
Unity Scene
extension methods.
Inheritance
System.Object
SceneExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StansAssets.Foundation.Extensions
Assembly: cs.temp.dll.dll
Syntax
public static class SceneExtensions
Methods
GetComponent<T>(Scene)
Returns the component of Type type
in on of the located on scene root GameObject.
A component is returned only if it is found on an active GameObject.
Declaration
public static T GetComponent<T>(this Scene scene)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | Scene to operate with. |
Returns
Type | Description |
---|---|
T | A component of the matching type, if found. |
Type Parameters
Name | Description |
---|---|
T | Type of the component. |
GetComponentInChildren<T>(Scene, Boolean)
Returns the component of Type type
in the located on scene root GameObject or any of its children using depth first search.
A component is returned only if it is found on an active GameObject.
Declaration
public static T GetComponentInChildren<T>(this Scene scene, bool includeInactive = false)
where T : class
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | Scene to operate with. |
System.Boolean | includeInactive | Should Components on inactive GameObjects be included in the found set? |
Returns
Type | Description |
---|---|
T | A component of the matching type, if found. |
Type Parameters
Name | Description |
---|---|
T | Type of the component. |