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
9using UnityEditor;
10
11namespace Leap.Unity.Recording {
12
13 [CustomEditor(typeof(EventClip))]
14 public class EventClipEditor : CustomEditorBase<EventClip> {
15
16 protected override void OnEnable() {
17 base.OnEnable();
18
20 "colorArg");
22 "floatArg");
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}
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...