Tanoda
InspectorName.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
UnityEngine
;
10
11
namespace
Leap.Unity.Attributes
{
12
13
public
class
InspectorNameAttribute
:
CombinablePropertyAttribute
,
IFullPropertyDrawer
{
14
15
public
readonly
string
name
;
16
17
public
InspectorNameAttribute
(
string
name
) {
18
this.name =
name
;
19
}
20
21
#if UNITY_EDITOR
22
public
void
DrawProperty(Rect rect,
UnityEditor
.SerializedProperty property,
23
GUIContent label) {
24
label.text =
name
;
25
UnityEditor
.EditorGUI.PropertyField(rect, property, label, includeChildren:
true
);
26
}
27
#endif
28
}
29
}
Leap.Unity.Attributes.CombinablePropertyAttribute
Definition:
CombinablePropertyAttribute.cs:66
Leap.Unity.Attributes.InspectorNameAttribute
Definition:
InspectorName.cs:13
Leap.Unity.Attributes.InspectorNameAttribute.InspectorNameAttribute
InspectorNameAttribute(string name)
Definition:
InspectorName.cs:17
Leap.Unity.Attributes.InspectorNameAttribute.name
readonly string name
Definition:
InspectorName.cs:15
Leap.Unity.Attributes.IFullPropertyDrawer
Definition:
CombinablePropertyAttribute.cs:33
Leap.Unity.Attributes
Definition:
CombinablePropertyDrawer.cs:16
UnityEditor
Definition:
BoxSliderEditor.cs:6
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Core
Scripts
Attributes
InspectorName.cs
Generated by
1.9.3