GameObjectExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extension methods for Unity's GameObject class
public static class GameObjectExtensions
type GameObjectExtensions = class
Public Module GameObjectExtensions
- Inheritance
-
GameObjectExtensions
Methods
| Name | Description |
|---|---|
| ApplyToHierarchy(GameObject, Action<GameObject>) |
Apply the specified delegate to all objects in the hierarchy under a specified game object. |
| FindAncestorComponent<T>(GameObject, Boolean) |
Find the first component of type |
| ForEachComponent<T>(GameObject, Action<T>) |
Perform an action on every component of type T that is on this GameObject |
| IsComponentRequired<T>(GameObject, List<Type>) |
Checks if any MonoBehaviour on the given GameObject is using the RequireComponentAttribute requiring type T |
| IsInLayerMask(GameObject, LayerMask) |
Determines whether or not a game object's layer is included in the specified layer mask. |
| SetChildrenActive(GameObject, Boolean) |
Set all GameObject children active or inactive based on argument |