IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
HideOnHandFocusLost.cs
1 //======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 //
3 // Purpose: Sets this GameObject as inactive when it loses focus from the hand
4 //
5 //=============================================================================
6 
7 using UnityEngine;
8 using System.Collections;
9 
10 namespace Valve.VR.InteractionSystem
11 {
12  //-------------------------------------------------------------------------
13  public class HideOnHandFocusLost : MonoBehaviour
14  {
15  //-------------------------------------------------
16  private void OnHandFocusLost( Hand hand )
17  {
18  gameObject.SetActive( false );
19  }
20  }
21 }