Tanoda
AttachmentHandEnableDisable.cs
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) Ultraleap, Inc. 2011-2020. *
3
* *
4
* Use subject to the terms of the Apache License 2.0 available at *
5
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6
* between Ultraleap and you, your company or other organization. *
7
******************************************************************************/
8
9
using
Leap
.
Unity
;
10
using
Leap
.
Unity
.
Attachments
;
11
using
System.Collections;
12
using
System.Collections.Generic;
13
using
UnityEngine
;
14
15
namespace
Leap.Unity.Attachments
{
16
17
public
class
AttachmentHandEnableDisable
: MonoBehaviour {
18
19
public
AttachmentHand
attachmentHand
;
20
21
void
Update() {
22
// Deactivation trigger
23
if
(!
attachmentHand
.
isTracked
&&
attachmentHand
.gameObject.activeSelf) {
24
attachmentHand
.gameObject.SetActive(
false
);
25
}
26
27
// Reactivation trigger
28
if
(
attachmentHand
.
isTracked
&& !
attachmentHand
.gameObject.activeSelf) {
29
attachmentHand
.gameObject.SetActive(
true
);
30
}
31
}
32
33
}
34
35
}
Leap.Unity.Attachments.AttachmentHandEnableDisable
Definition:
AttachmentHandEnableDisable.cs:17
Leap.Unity.Attachments.AttachmentHandEnableDisable.attachmentHand
AttachmentHand attachmentHand
Definition:
AttachmentHandEnableDisable.cs:19
Leap.Unity.Attachments.AttachmentHand
This MonoBehaviour is managed by an AttachmentHands component on a parent MonoBehaviour....
Definition:
AttachmentHand.cs:28
Leap.Unity.Attachments.AttachmentHand.isTracked
bool isTracked
Gets the chirality of this AttachmentHand. This is set automatically by the AttachmentHands parent ob...
Definition:
AttachmentHand.cs:124
Leap.Unity.Attachments
Definition:
AttachmentHandsEditor.cs:14
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Core
Scripts
Attachments
AttachmentHandEnableDisable.cs
Generated by
1.9.3