Tanoda
LeapTextureDataDrawer.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
12
namespace
Leap.Unity.GraphicalRenderer
{
13
14
[CustomPropertyDrawer(typeof(LeapTextureData))]
15
public
class
LeapTextureDataDrawer
:
CustomPropertyDrawerBase
{
16
17
protected
override
void
init
(SerializedProperty property) {
18
base.init(property);
19
20
var channelFeature =
LeapGraphicEditor
.
currentFeature
as
LeapTextureFeature
;
21
Func<string> nameFunc = () => {
22
if
(channelFeature ==
null
) {
23
return
null
;
24
}
else
{
25
return
channelFeature.
propertyName
;
26
}
27
};
28
29
drawProperty
(
"_texture"
, nameFunc);
30
}
31
}
32
}
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.LeapGraphicEditorBase.currentFeature
static LeapGraphicFeatureBase currentFeature
Definition:
LeapGraphicEditor.cs:22
Leap.Unity.GraphicalRenderer.LeapGraphicEditor
Definition:
LeapGraphicEditor.cs:18
Leap.Unity.GraphicalRenderer.LeapTextureDataDrawer
Definition:
LeapTextureDataDrawer.cs:15
Leap.Unity.GraphicalRenderer.LeapTextureDataDrawer.init
override void init(SerializedProperty property)
Definition:
LeapTextureDataDrawer.cs:17
Leap.Unity.GraphicalRenderer.LeapTextureFeature
Definition:
LeapTextureFeature.cs:21
Leap.Unity.GraphicalRenderer.LeapTextureFeature.propertyName
string propertyName
Definition:
LeapTextureFeature.cs:25
Leap.Unity.GraphicalRenderer
Definition:
EditorPickingMeshRebuilder.cs:12
UnityEditor
Definition:
BoxSliderEditor.cs:6
Source
Assets
Plugins
LeapMotion
Legacy
GraphicRenderer
Scripts
Features
Texture
Editor
LeapTextureDataDrawer.cs
Generated by
1.9.3