ActiveAtDistance


Declaration

public sealed class ActiveAtDistance : MonoBehaviour

Description

Sets another game object to be active or inactive based on the distance to a target transform.

Properties

rangeTypeWhether the object is active or inactive when the target is in range.
distanceTargetThe target transform to measure distance from.
activatingObjectThe object to activate or deactivate.
minDistanceThe minimum distance for the object to be active.
maxDistanceThe maximum distance for the object to be active.
withinRangeWhether object is currently within the range.