Tanoda
RecorderBuddy.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
.
Recording
;
10
using
UnityEngine
;
11
12
public
class
RecorderBuddy
: MonoBehaviour {
13
14
public
HierarchyRecorder
recorder
;
15
16
public
float
recordingDuration
= 1f;
17
public
KeyCode
recordButton
= KeyCode.Space;
18
19
protected
float
_curDuration
= 0f;
20
21
#if UNITY_EDITOR
22
void
Reset() {
23
if
(
recorder
==
null
) {
24
recorder
= GetComponent<HierarchyRecorder>();
25
}
26
}
27
28
void
Update() {
29
if
(
_curDuration
>
recordingDuration
) {
30
recorder
.FinishRecording();
31
}
32
33
if
(Input.GetKeyDown(
recordButton
)) {
34
recorder
.BeginRecording();
35
}
36
37
if
(
recorder
.
isRecording
) {
38
_curDuration
+= Time.deltaTime;
39
}
40
}
41
#endif
42
}
Leap.Unity.Recording.HierarchyRecorder
Definition:
HierarchyRecorder.cs:22
Leap.Unity.Recording.HierarchyRecorder.isRecording
bool isRecording
Definition:
HierarchyRecorder.cs:55
RecorderBuddy
Definition:
RecorderBuddy.cs:12
RecorderBuddy.recordButton
KeyCode recordButton
Definition:
RecorderBuddy.cs:17
RecorderBuddy.recorder
HierarchyRecorder recorder
Definition:
RecorderBuddy.cs:14
RecorderBuddy._curDuration
float _curDuration
Definition:
RecorderBuddy.cs:19
RecorderBuddy.recordingDuration
float recordingDuration
Definition:
RecorderBuddy.cs:16
Leap.Unity.Recording
Definition:
HierarchyPostProcessEditor.cs:15
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Experimental
HierarchyRecording
Scripts
RecorderBuddy.cs
Generated by
1.9.3