Tanoda
EventClipEditor.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
UnityEditor
;
10
11
namespace
Leap.Unity.Recording
{
12
13
[CustomEditor(typeof(EventClip))]
14
public
class
EventClipEditor
:
CustomEditorBase
<EventClip> {
15
16
protected
override
void
OnEnable
() {
17
base.OnEnable();
18
19
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Color,
20
"colorArg"
);
21
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Float,
22
"floatArg"
);
23
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Int,
24
"intArg"
);
25
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Quaternion,
26
"quaternionArg"
);
27
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.String,
28
"stringArg"
);
29
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Vector2,
30
"vector2Arg"
);
31
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Vector3,
32
"vector3Arg"
);
33
specifyConditionalDrawing
(() =>
target
.argumentType ==
SerializedArgumentType
.Vector4,
34
"vector4Arg"
);
35
}
36
37
}
38
39
}
Leap.Unity.CustomEditorBase
Definition:
CustomEditorBase.cs:17
Leap.Unity.CustomEditorBase< EventClip >::specifyConditionalDrawing
void specifyConditionalDrawing(string conditionalName, params string[] dependantProperties)
Specify a list of properties that should only be displayed if the conditional property has a value of...
Definition:
CustomEditorBase.cs:112
Leap.Unity.CustomEditorBase< EventClip >::target
new T target
Definition:
CustomEditorBase.cs:18
Leap.Unity.Recording.EventClipEditor
Definition:
EventClipEditor.cs:14
Leap.Unity.Recording.EventClipEditor.OnEnable
override void OnEnable()
Definition:
EventClipEditor.cs:16
Leap.Unity.Recording
Definition:
HierarchyPostProcessEditor.cs:15
Leap.Unity.Recording.SerializedArgumentType
SerializedArgumentType
Definition:
EventClip.cs:147
UnityEditor
Definition:
BoxSliderEditor.cs:6
Source
Assets
Plugins
LeapMotion
Experimental
HierarchyRecording
Scripts
Events
Editor
EventClipEditor.cs
Generated by
1.9.3