Game Object Find Closest With Data
Finds the closest GameObject that has a matching Data Component for a specific DataDefinition.
Parameters
| Parameter | Description |
|---|---|
| GameObject | Source GameObject to measure from. |
| DataDefinition | Required DataDefinition to match on Data Components. |
| MaxDistance | Excludes objects farther than this distance. |
| ExcludeChildren | If true, excludes child objects of the source from search results. |
| IncludeInactive | If true, includes inactive objects in the search. |
| Closest | Output closest matching GameObject (or null). |
| Component | Optional output matching Data Component (or null). |