您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
29 行
732 B
29 行
732 B
using UnityEditor;
|
|
using UnityEditorInternal;
|
|
|
|
[CustomEditor(typeof(DeviceDisplayConfigurator))]
|
|
[CanEditMultipleObjects]
|
|
public class DeviceDisplayConfiguratorEditor : Editor
|
|
{
|
|
private ReorderableList list2;
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
|
|
this.serializedObject.Update();
|
|
|
|
ReorderableListUtility.DoLayoutListWithFoldout(this.list2);
|
|
|
|
this.serializedObject.ApplyModifiedProperties();
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
var property = this.serializedObject.FindProperty("deviceSettings");
|
|
|
|
this.list2 = ReorderableListUtility.CreateAutoLayout(
|
|
property,
|
|
new string[] { "Raw Path Name", "Display Name", "Display Color" }
|
|
);
|
|
}
|
|
}
|