EnableAtDistance


Declaration

public sealed class EnableAtDistance : MonoBehaviour

Description

Enables or disables a behavior based on the distance to a target transform.

Properties

rangeTypeWhether the object is enabled or disabled when the target is in range.
targetThe target transform to measure distance from.
enablingBehaviorThe behavior to enable or disable.
minDistanceThe minimum distance for the behavior to be enabled.
maxDistanceThe maximum distance for the behavior to be enabled.
withinRangeWhether object is currently within the range.