Class GameObjectExtensions
Unity GameObject
extension methods.
Inheritance
System.Object
GameObjectExtensions
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 GameObjectExtensions
Methods
GetLocalIdentifierInFile(GameObject)
Gets the local Identifier In File, for the given GameObject Return 0 in case Game Object wasn't yet saved
Declaration
public static int GetLocalIdentifierInFile(GameObject go)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | GameObject you want to check |
Returns
Type | Description |
---|---|
System.Int32 |
GetRendererBounds(GameObject)
Renderer Bounds of the game object.
Declaration
public static Bounds GetRendererBounds(this GameObject go)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | GameObject you want calculate bounds for. |
Returns
Type | Description |
---|---|
Bounds | Calculated game object bounds. |
SetLayerRecursively(GameObject, Int32)
Set layer to all GameObject children, including inactive.
Declaration
public static void SetLayerRecursively(this GameObject gameObject, int layerNumber)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | Target GameObject. |
System.Int32 | layerNumber | Layer number. |