protected override void Start() { #if UNITY_EDITOR UGUITools.AutoUIRoot(this); #endif base.Start(); }
protected override void Start() { #if UNITY_EDITOR UGUITools.AutoUIRoot(this); #endif base.Start(); enabled = sprite; m_Polygon = GetComponent <PolygonCollider2D>(); }
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); }
public void SetInteractable(bool interactable) { this.interactable = interactable; UGUITools.SetGrayscale(gameObject, !interactable); }