Tanoda
OnUnityCallbackEditor.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(OnUnityCallback))]
14
public
class
OnUnityCallbackEditor
:
CustomEditorBase
<OnUnityCallback> {
15
16
private
SerializedProperty _tableProp;
17
private
EnumEventTableEditor
_tableEditor;
18
19
protected
override
void
OnEnable
() {
20
base.OnEnable();
21
22
_tableProp = serializedObject.FindProperty(
"_table"
);
23
_tableEditor =
new
EnumEventTableEditor
(_tableProp, typeof(
OnUnityCallback
.
CallbackType
));
24
25
specifyCustomDrawer
(
"_table"
, drawTable);
26
}
27
28
private
void
drawTable(SerializedProperty p) {
29
_tableEditor.
DoGuiLayout
();
30
}
31
}
32
}
Leap.Unity.CustomEditorBase
Definition:
CustomEditorBase.cs:17
Leap.Unity.CustomEditorBase< OnUnityCallback >::specifyCustomDrawer
void specifyCustomDrawer(string propertyName, Action< SerializedProperty > propertyDrawer)
Specify a callback to be used to draw a specific named property. Should be called in OnEnable.
Definition:
CustomEditorBase.cs:56
Leap.Unity.EnumEventTableEditor
Definition:
EnumEventTableEditor.cs:16
Leap.Unity.EnumEventTableEditor.DoGuiLayout
void DoGuiLayout()
Definition:
EnumEventTableEditor.cs:46
Leap.Unity.Recording.OnUnityCallbackEditor
Definition:
OnUnityCallbackEditor.cs:14
Leap.Unity.Recording.OnUnityCallbackEditor.OnEnable
override void OnEnable()
Definition:
OnUnityCallbackEditor.cs:19
Leap.Unity.Recording.OnUnityCallback
Definition:
OnUnityCallback.cs:13
Leap.Unity.Recording.OnUnityCallback.CallbackType
CallbackType
Definition:
OnUnityCallback.cs:54
Leap.Unity.Recording
Definition:
HierarchyPostProcessEditor.cs:15
UnityEditor
Definition:
BoxSliderEditor.cs:6
Source
Assets
Plugins
LeapMotion
Experimental
HierarchyRecording
Scripts
StateMachine
StateBehaviours
Editor
OnUnityCallbackEditor.cs
Generated by
1.9.3