Description
The FindMode.Enabled
field is a member of the FindMode
enumeration in the Sandbox namespace. It is used to specify that only components which are currently enabled should be considered during a search operation. This is particularly useful when you want to filter out components that are not active in the scene.
Usage
Use FindMode.Enabled
when you need to search for components that are currently active. This can be combined with other FindMode
flags to refine your search criteria. For example, you might use it in conjunction with FindMode.InChildren
to find all enabled components within the children of a GameObject.
Example
// Example of using FindMode.Enabled
var enabledComponents = myGameObject.FindComponents<Component>(FindMode.Enabled);
// This will return all enabled components attached to 'myGameObject'.