Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


sleepMode

The sleep state that the rigidbody will initially be in.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public RigidbodySleepMode2D sleepMode { get; set; }

Remarks

Sleeping is an optimisation that is used to temporarily remove an object from physics simulation when it is at rest. This property chooses whether the rigidbody should start off asleep, awake or have sleeping turned off altogether.
For more information about Rigidbody sleeping, refer to the Physics Overview.