Rigidbody.IsSleeping Manual     Reference     Scripting  
Scripting > Runtime Classes > Rigidbody
Rigidbody.IsSleeping

function IsSleeping () : bool

Description

Is the rigidbody sleeping?

See Rigidbody Sleeping for more information.

JavaScripts
if (rigidbody.IsSleeping())
print("Sleeping");

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
if (rigidbody.IsSleeping())
print("Sleeping");

}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
if rigidbody.IsSleeping():
print('Sleeping')