Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


enabled

Indicates whether the collision response or reaction is enabled or disabled.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool enabled { get; }

Remarks

Certain features can disable collision responses which means you still get the collision callback but no response or reaction happens. For example, two boxes going through each other without any visible reaction. The platform effector is one such feature that can disable a collision response.
Additional Resources: ContactPoint2D.enabled.