Skip to content

Game Object Find Closest

Finds the closest GameObject to a source object.

Parameter Description
GameObject Source object to measure from.
Max Distance Excludes objects farther than this distance.
Exclude Children If true, excludes child objects of the source.
Include Inactive If true, includes inactive objects in the search.
Result Output closest GameObject (null if none found).