Tanoda
PostProcessProviderEditor.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
;
10
using
System.Collections;
11
using
System.Collections.Generic;
12
using
UnityEditor
;
13
using
UnityEngine
;
14
15
namespace
Leap.Unity
{
16
17
[CustomEditor(typeof(
PostProcessProvider
), editorForChildClasses:
true
)]
18
public
class
PostProcessProviderEditor
:
CustomEditorBase
<PostProcessProvider> {
19
20
protected
override
void
OnEnable
() {
21
base.OnEnable();
22
23
// Edit-time pose is only relevant for providers that generate hands.
24
// Post-process Providers are a special case and don't generate their own hands.
25
specifyConditionalDrawing
(() =>
false
,
"editTimePose"
);
26
}
27
28
public
override
void
OnInspectorGUI
() {
29
base.OnInspectorGUI();
30
31
drawNotificationsGUI();
32
}
33
34
private
void
drawNotificationsGUI() {
35
var provider = this.
target
;
36
37
if
(!provider.enabled) {
38
EditorGUILayout.HelpBox(
39
message:
"This post-process provider is disabled, so it will not output any "
40
+
"hand data. Use pass-through mode if you only want to disable its "
41
+
"post-processing and still output hands."
,
42
type: MessageType.Info
43
);
44
}
45
else
if
(provider.passthroughOnly) {
46
EditorGUILayout.HelpBox(
47
message:
"This post-process provider is set to pass-through only, so it will "
48
+
"pass its input unmodified to its output."
,
49
type: MessageType.Info
50
);
51
}
52
}
53
54
}
55
56
}
Leap.Unity.CustomEditorBase
Definition:
CustomEditorBase.cs:17
Leap.Unity.CustomEditorBase< PostProcessProvider >::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< PostProcessProvider >::target
new T target
Definition:
CustomEditorBase.cs:18
Leap.Unity.PostProcessProviderEditor
Definition:
PostProcessProviderEditor.cs:18
Leap.Unity.PostProcessProviderEditor.OnEnable
override void OnEnable()
Definition:
PostProcessProviderEditor.cs:20
Leap.Unity.PostProcessProviderEditor.OnInspectorGUI
override void OnInspectorGUI()
Definition:
PostProcessProviderEditor.cs:28
Leap.Unity.PostProcessProvider
Definition:
PostProcessProvider.cs:14
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEditor
Definition:
BoxSliderEditor.cs:6
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Core
Editor
PostProcessProviderEditor.cs
Generated by
1.9.3