using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class GameUIEditor : MonoBehaviour { #if UNITY_EDITOR public eGameMode CurUIMode, ChangeUIMode; void Update() { if (CurUIMode != ChangeUIMode) { CurUIMode = ChangeUIMode; GetComponent().Set_UI(CurUIMode); } } #endif }