Description
The EverythingInSelfAndChildren
field is a member of the FindMode
enumeration in the Sandbox namespace. This enumeration is used to specify the scope of a search operation for components or game objects within a scene. The EverythingInSelfAndChildren
value indicates that the search should include all components or game objects within the current object and its immediate children.
Usage
Use FindMode.EverythingInSelfAndChildren
when you need to search for components or game objects that are located within the current object and its direct children. This is useful when you want to perform operations or queries that involve both the current object and its immediate descendants.
Example
// Example of using FindMode.EverythingInSelfAndChildren
// Assume 'gameObject' is an instance of GameObject
var components = gameObject.FindComponents<SomeComponent>(FindMode.EverythingInSelfAndChildren);
// This will retrieve all instances of SomeComponent in the current GameObject and its children.