IMHOTEP Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
Assets
ThirdParty
SteamVR
InteractionSystem
Core
Scripts
SleepOnAwake.cs
1
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2
//
3
// Purpose: This object's rigidbody goes to sleep when created
4
//
5
//=============================================================================
6
7
using
UnityEngine;
8
using
System.Collections;
9
10
namespace
Valve.VR.InteractionSystem
11
{
12
//-------------------------------------------------------------------------
13
public
class
SleepOnAwake
: MonoBehaviour
14
{
15
//-------------------------------------------------
16
void
Awake()
17
{
18
Rigidbody rigidbody = GetComponent<Rigidbody>();
19
if
( rigidbody )
20
{
21
rigidbody.Sleep();
22
}
23
}
24
}
25
}
Valve.VR.InteractionSystem.SleepOnAwake
Definition:
SleepOnAwake.cs:13
Generated by
1.8.6