Code-Tags welche Auswirkungen auf die Darstellung im Inspector haben.
[Range(0, 100)]
public float MyValue;
[Header("Hi there!")]
public string TheHeader = "Header!";
[Tooltip("This is THE VALUE!")]
[ContextMenuItem("Reset", "resetTheValue")]
public float TheValue = 42.0f;
[Space(50)]
public string TheString = "THE STRING";
private void resetTheValue()
{
TheValue = 42;
}
Listen:
private ReorderableList list;
list = new ReorderableList(property.serializedObject, property.FindPropertyRelative("tagList"), true, true, true, true);
list.drawHeaderCallback += rect => GUI.Label(rect, label);
list.drawElementCallback += (rect, index, active, focused) =>
{
rect.height = 16;
rect.y += 2;
EditorGUI.PropertyField(rect,
list.serializedProperty.GetArrayElementAtIndex(index),
GUIContent.none);
};
list.DoList(position);
7c1a8697-5758-4ff0-8b63-5a9ba3d4a353|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04