FindMode EverythingInSelfAndParent

book_4_sparkGenerated
code_blocksInput

Description

The EverythingInSelfAndParent field is a member of the FindMode enumeration in the Sandbox API. 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
var components = myGameObject.FindComponents<SomeComponent>(FindMode.EverythingInSelfAndParent);

// This will search for 'SomeComponent' instances in 'myGameObject' and its parent.