GameObjectExtensions
Static Class in Zigurous.Utility
Declaration
public static class GameObjectExtensions
Description
Extension methods for Unity GameObjects.
Extension Methods
SetLayerInChildren | Sets the layer of the game object and all of its children. |
DestroyAllChildren | Destroys all children game objects. |
GetRequiredComponent<T> | Gets the specified component from the game object. If the component does not exist then it will be added to the game object. |
HasComponent<T> | Checks if the game object has a component of the specified type. |
HasComponent | Checks if the game object has a component of the specified type. |
HasComponentInChildren<T> | Checks if the game object has a component of the specified type on itself or on any of its children using depth first search. |
HasComponentInChildren | Checks if the game object has a component of the specified type on itself or on any of its children using depth first search. |
HasComponentInParent<T> | Checks if the game object has a component of the specified type on itself or any of its parents. |
HasComponentInParent | Checks if the game object has a component of the specified type on itself or any of its parents. |
CopyComponent_UNSAFE<T> | Copies a component from one game object to another with the exact same values. |