Пример #1
0
        protected override void Start()
        {
#if UNITY_EDITOR
            UGUITools.AutoUIRoot(this);
#endif
            base.Start();
        }
Пример #2
0
        protected override void Start()
        {
#if UNITY_EDITOR
            UGUITools.AutoUIRoot(this);
#endif
            base.Start();
            enabled   = sprite;
            m_Polygon = GetComponent <PolygonCollider2D>();
        }
Пример #3
0
        static RectTransform CreatUIBase(GameObject parent)
        {
            if (parent == null)
            {
                parent = UGUITools.SelectedRoot(true);
            }

            GameObject go = new GameObject("GameObject");

            go.SetParent(parent, false);
            var rectTrans = go.AddComponent <RectTransform>();

            rectTrans.anchoredPosition = Vector2.zero;
            go.AddComponent <CanvasRenderer>();
            return(rectTrans);
        }
Пример #4
0
 public void SetInteractable(bool interactable)
 {
     this.interactable = interactable;
     UGUITools.SetGrayscale(gameObject, !interactable);
 }