using System; using UnityEngine; using UnityEngine.EventSystems; public static class Extension { public static T GetOrAddComponent(this GameObject go) where T : UnityEngine.Component { return Util.GetOrAddComponent(go); } public static void AddUIEvent(this GameObject go, Action action, Define.UIEvent type = Define.UIEvent.Click) { UI_Base.BindEvent(go, action, type); } }