Files
aibis-dream/Assets/Plugins/CleanFlatUI/Scripts/Editor/Dropdown/DropdownMultiCheckEditor.cs
T
2024-10-10 12:46:34 +08:00

37 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
using UnityEditorInternal;
using UnityEditor.UI;
namespace RainbowArt.CleanFlatUI
{
[CustomEditor(typeof(DropdownMultiCheck))]
public class DropdownMultiCheckEditor : DropdownEditor
{
SerializedProperty selectedOptions;
SerializedProperty onSelectValueChanged;
protected override void OnEnable()
{
base.OnEnable();
selectedOptions = serializedObject.FindProperty("selectedOptions");
onSelectValueChanged = serializedObject.FindProperty("onSelectValueChanged");
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
serializedObject.Update();
EditorGUILayout.Space();
EditorGUILayout.PropertyField(selectedOptions);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(onSelectValueChanged);
serializedObject.ApplyModifiedProperties();
}
}
}