GameObjectExtensions
Static Class in Zigurous.Architecture
Declaration
public static class GameObjectExtensionsDescription
Extension methods for Unity GameObjects.
Extension Methods
| SetLayerInChildren | Sets the layer of the parent game object and all of its children. |
| DestroyChildren | Destroys all children game objects of the parent. |
| DestroyChildrenImmediate | Destroys all children game objects of the parent immediately. You are strongly recommended to use DestroyChildren instead. |
| 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. |