Description
The FindMode.Disabled
field is a member of the FindMode
enumeration in the Sandbox namespace. It is used to specify that the search should target components that are currently disabled. This enumeration is part of a set of flags that define different modes for searching components within a game object hierarchy.
Usage
Use FindMode.Disabled
when you need to find components that are not currently active or enabled. This can be useful in scenarios where you want to perform operations on components that are not currently participating in the game logic or rendering.
Example
// Example of using FindMode.Disabled to find disabled components
var disabledComponents = gameObject.FindComponents<SomeComponent>(FindMode.Disabled);
// Iterate over the found components
foreach (var component in disabledComponents)
{
// Perform operations on each disabled component
component.DoSomething();
}