Ejemplo n.º 1
0
        static public void RemoveListen(GameObject go)
        {
            UIEvents listener = go.GetComponent <UIEvents>();

            if (listener != null)
            {
                Destroy(listener);
            }
        }
Ejemplo n.º 2
0
        static public UIEvents Listen(GameObject go)
        {
            UIEvents listener = go.GetComponent <UIEvents>();

            if (listener == null)
            {
                listener = go.AddComponent <UIEvents>();
            }
            return(listener);
        }