|
| EditorGUIPanelAttribute (string editorMethodName, int heightInLines=1) |
| Pass the name of a static method in your MonoBehaviour that accepts a Rect and Object[] targets, which reflects the current editor selection (might be multiple of your MonoBehaviours in a multi-select case). The method is called in an OnGUI inspector context, so you can make EditorGUI or GUI calls. See the example below for example usage. More...
|
|
Definition at line 21 of file EditorGUIPanel.cs.
◆ EditorGUIPanelAttribute()
Leap.Unity.Attributes.EditorGUIPanelAttribute.EditorGUIPanelAttribute |
( |
string |
editorMethodName, |
|
|
int |
heightInLines = 1 |
|
) |
| |
Pass the name of a static method in your MonoBehaviour that accepts a Rect and Object[] targets, which reflects the current editor selection (might be multiple of your MonoBehaviours in a multi-select case). The method is called in an OnGUI inspector context, so you can make EditorGUI or GUI calls. See the example below for example usage.
[EditorGUIPanel("DrawPanel")]
public SomeType inspectorObj;
#if UNITY_EDITOR
if (GUI.Button(panel, "Do Thing")) {
targets.ForEach≤MyBehaviour≥(r => r.DoThing());
}
#endif
}
Definition at line 49 of file EditorGUIPanel.cs.
◆ editorMethodName
readonly string Leap.Unity.Attributes.EditorGUIPanelAttribute.editorMethodName |
◆ heightInLines
int Leap.Unity.Attributes.EditorGUIPanelAttribute.heightInLines |
◆ LINE_HEIGHT
const float Leap.Unity.Attributes.EditorGUIPanelAttribute.LINE_HEIGHT = 20f |
|
static |
The documentation for this class was generated from the following file: