文档

Unity Engine


User Manual

Script Reference

Unity Engine


sleepMode

The sleep state that the rigidbody will initially be in.
阅读时间1 分钟最后更新于 1 个月前

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.