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
9using UnityEngine;
10
11namespace Leap.Unity.Attributes {
12
14
15 public readonly string name;
16
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}