22 lines
609 B
C#
22 lines
609 B
C#
|
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
|
|||
|
//
|
|||
|
// Purpose: Sets this GameObject as inactive when it loses focus from the hand
|
|||
|
//
|
|||
|
//=============================================================================
|
|||
|
|
|||
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
|
|||
|
namespace Valve.VR.InteractionSystem
|
|||
|
{
|
|||
|
//-------------------------------------------------------------------------
|
|||
|
public class HideOnHandFocusLost : MonoBehaviour
|
|||
|
{
|
|||
|
//-------------------------------------------------
|
|||
|
private void OnHandFocusLost( Hand hand )
|
|||
|
{
|
|||
|
gameObject.SetActive( false );
|
|||
|
}
|
|||
|
}
|
|||
|
}
|