Tanoda
CustomChannelDataDrawer.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
System;
10
using
UnityEditor
;
11
using
Leap
.
Unity
.
Query
;
12
13
namespace
Leap.Unity.GraphicalRenderer
{
14
15
[CustomPropertyDrawer(typeof(CustomChannelDataBase), useForChildren:
true
)]
16
public
class
CustomChannelDataBaseDrawer
:
CustomPropertyDrawerBase
{
17
18
protected
override
void
init
(SerializedProperty property) {
19
base.init(property);
20
21
var channelFeature =
LeapGraphicEditor
.
currentFeature
as
ICustomChannelFeature
;
22
Func<string> nameFunc = () => {
23
if
(channelFeature ==
null
) {
24
return
null
;
25
}
else
{
26
return
channelFeature.
channelName
;
27
}
28
};
29
30
drawProperty
(
"_value"
, nameFunc);
31
}
32
}
33
}
Leap.Unity.CustomPropertyDrawerBase
Definition:
CustomPropertyDrawerBase.cs:16
Leap.Unity.CustomPropertyDrawerBase.drawProperty
void drawProperty(string name, bool includeChildren=true, bool disable=false)
Definition:
CustomPropertyDrawerBase.cs:100
Leap.Unity.GraphicalRenderer.CustomChannelDataBaseDrawer
Definition:
CustomChannelDataDrawer.cs:16
Leap.Unity.GraphicalRenderer.CustomChannelDataBaseDrawer.init
override void init(SerializedProperty property)
Definition:
CustomChannelDataDrawer.cs:18
Leap.Unity.GraphicalRenderer.LeapGraphicEditorBase.currentFeature
static LeapGraphicFeatureBase currentFeature
Definition:
LeapGraphicEditor.cs:22
Leap.Unity.GraphicalRenderer.LeapGraphicEditor
Definition:
LeapGraphicEditor.cs:18
Leap.Unity.GraphicalRenderer.ICustomChannelFeature
Definition:
CustomChannelFeatureBase.cs:15
Leap.Unity.GraphicalRenderer.ICustomChannelFeature.channelName
string channelName
Definition:
CustomChannelFeatureBase.cs:16
Leap.Unity.GraphicalRenderer
Definition:
EditorPickingMeshRebuilder.cs:12
Leap.Unity.Query
Definition:
Query.cs:13
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEditor
Definition:
BoxSliderEditor.cs:6
Source
Assets
Plugins
LeapMotion
Legacy
GraphicRenderer
Scripts
Features
CustomChannel
Editor
CustomChannelDataDrawer.cs
Generated by
1.9.3