Description
The EverythingInDescendants
field is a member of the FindMode
enumeration in the Sandbox namespace. It is used to specify a search mode that includes all components within the descendants of a GameObject. This includes all children, their children, and so on, regardless of their enabled or disabled state.
Usage
Use FindMode.EverythingInDescendants
when you need to retrieve all components from a GameObject's entire hierarchy of descendants. This is particularly useful when you want to perform operations on every component within a complex object structure.
Example
// Example of using FindMode.EverythingInDescendants
GameObject myObject = new GameObject();
var components = myObject.FindComponents( FindMode.EverythingInDescendants );
foreach (var component in components)
{
// Perform operations on each component
component.DoSomething();
}