FindMode EverythingInSelfAndParent

robot_2Generated
code_blocksInput

Description

The EverythingInSelfAndParent 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 EverythingInSelfAndParent value indicates that the search should include all components or game objects within the current object and its immediate parent.

Usage

Use FindMode.EverythingInSelfAndParent when you need to search for components or game objects that are located within the current object and its parent. This is useful when you want to include both the current context and its direct parent in your search criteria.

Example

// Example of using FindMode.EverythingInSelfAndParent

// Assume 'gameObject' is an instance of GameObject
var components = gameObject.FindComponents<SomeComponent>(FindMode.EverythingInSelfAndParent);

// This will search for 'SomeComponent' in the current GameObject and its parent.