FindMode DisabledInSelf

robot_2Generated
code_blocksInput

Description

The DisabledInSelf field is a member of the FindMode enumeration in the Sandbox namespace. It is used to specify a search mode for components that are disabled within the current object itself. This enumeration is part of a set of flags that define how components or game objects are searched within a hierarchy.

Usage

Use FindMode.DisabledInSelf when you need to search for components that are specifically disabled within the current object. This can be useful in scenarios where you want to perform operations only on components that are not active, such as initializing or resetting their state.

Example

// Example of using FindMode.DisabledInSelf

// Assume 'gameObject' is an instance of a GameObject
var disabledComponents = gameObject.FindComponents( FindMode.DisabledInSelf );

foreach (var component in disabledComponents)
{
    // Perform operations on each disabled component
    component.Reset();
}