Tanoda
HandTransitionBehavior.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
9using UnityEngine;
10using System.Collections;
11
12namespace Leap.Unity {
13
19 public abstract class HandTransitionBehavior : MonoBehaviour {
20
22
23 protected abstract void HandReset();
24 protected abstract void HandFinish();
25
26 protected virtual void Awake(){
27 handModelBase = GetComponent<HandModelBase>();
28 if (handModelBase == null) {
29 Debug.LogWarning("HandTransitionBehavior components require a HandModelBase "
30 + "component attached to the same GameObject. (Awake)");
31 return;
32 }
33
36
39 }
40
41 protected virtual void OnDestroy() {
42 if (handModelBase == null) {
43 HandModelBase handModelBase = GetComponent<HandModelBase>();
44 if (handModelBase == null) {
45 Debug.LogWarning("HandTransitionBehavior components require a HandModelBase "
46 + "component attached to the same GameObject. (OnDestroy)");
47 return;
48 }
49 }
50
53 }
54 }
55}
UnityEngine.Debug Debug
Definition: TanodaServer.cs:19
A component to be attached to a HandModelBase to handle starting and ending of tracking....