GameObject Get Data Components In Children
Get all Data Components from a GameObject and its child hierarchy matching a DataDefinition.
Parameters
| Parameter | Description |
|---|---|
| Game Object | Root GameObject to search. |
| Data Definition | Required definition used to filter components. |
| Include Inactive | Include inactive objects in the search. |
| First Data Component | First match output. |
| Data Components | List of all matches output. |
| Match Count | How many matches were found. |
| Succeeded | True if one or more components were found. |
Details
- Searches child objects using
GetComponentsInChildren<DataRecordComponent>. - Returns results for any components with the matching DataDefinition.
Examples
- Find all ingredient components in a crafting UI branch.
- Collect nearby player buffs from child objects.