using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor.UI; using UnityEditor; using XRTool.Util; using UnityEngine.UI; namespace XRTool.UI { [InitializeOnLoad] [CustomEditor(typeof(ToggleButton))] public class ToggleButtonEditor : ButtonEditor { private SerializedProperty closeImg; private SerializedProperty openImg; private SerializedProperty isOn; private ToggleButton toggle; [MenuItem("GameObject/XRUI/ToggleButton", priority = 5)] static void Init() { var obj = Selection.activeGameObject; if (obj && obj.GetComponent()) { if (obj.GetComponent