public override void OnInspectorGUI() { // base.OnInspectorGUI(); var prefabLevelManager = (PrefabLevelManager)target; serializedObject.Update(); //Debug level EditorGUILayout.Space(); EditorGUILayout.LabelField("Debug Level", HeaderStyle(), GUILayout.ExpandWidth(true)); debugLevel = serializedObject.FindProperty("DebugLevel"); EditorGUILayout.ObjectField(debugLevel); _isUseDebugLevel = EditorGUILayout.Toggle("Is Enabled", prefabLevelManager.IsUseDebugLevel); prefabLevelManager.IsUseDebugLevel = _isUseDebugLevel; //Prefab levels EditorGUILayout.Space(); EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); EditorGUILayout.LabelField("PrefabLevels", HeaderStyle(), GUILayout.ExpandWidth(true)); ReorderableListUtility.DoLayoutListWithFoldout(list1); //Loop levels EditorGUILayout.Space(); EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); EditorGUILayout.LabelField("Loop Levels (Read Only)", HeaderStyle(), GUILayout.ExpandWidth(true)); var loopLevels = serializedObject.FindProperty("LoopPrefabLevels"); EditorGUILayout.PropertyField(loopLevels, new GUIContent("Loop Levels"), true); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { this.serializedObject.Update(); ReorderableListUtility.DoLayoutListWithFoldout(this.emotions); this.serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); this.serializedObject.Update(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Available Tetrimini", EditorStyles.boldLabel); ReorderableListUtility.DoLayoutListWithFoldout(this.m_availableTetriminiList); this.serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); this.serializedObject.Update(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Example1", EditorStyles.boldLabel); ReorderableListUtility.DoLayoutListWithFoldout(this.list1); EditorGUILayout.Space(); EditorGUILayout.LabelField("Example2", EditorStyles.boldLabel); ReorderableListUtility.DoLayoutListWithFoldout(this.list2); this.serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); var levels = serializedObject.FindProperty("levels"); if (list == null) { list = ReorderableListUtility.CreateAutoLayout(levels); } list.drawElementCallback = (rect, index, active, focused) => { EditorGUI.PropertyField(rect, levels.GetArrayElementAtIndex(index), GUIContent.none); }; list.onAddCallback = (x) => levels.InsertArrayElementAtIndex(levels.arraySize); ReorderableListUtility.DoLayoutListWithFoldout(list); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { //base.OnInspectorGUI(); this.serializedObject.Update(); ReloadOptions(); if (options != null && options.Length > 0) { EditorGUILayout.LabelField("От имени пользователя:"); ((WritersSetting)target).ChosenWriter = EditorGUILayout.Popup(((WritersSetting)target).ChosenWriter, options); } else { EditorGUILayout.HelpBox("Список участников пуст!!!", MessageType.Error); } EditorGUILayout.Space(); ReorderableListUtility.DoLayoutListWithFoldout(reorderableList); this.serializedObject.ApplyModifiedProperties(); }