private void Setup() { this.gameObject.layer = LayerMask.NameToLayer("UI"); Helper.AddComponentsGameObject( new Type[] { typeof(UnityEngine.RectTransform) }, this.gameObject); this.rectTransform = this.GetRectTransform(); this.background = this.GetBackground(); this.foreground = this.GetForeground(); }
public UIBackground GetBackground() { if (this.background == null) { this.background = Helper .Instantiator .InstantiateAsComponent <UIBackground>(); this.background.SetMobileInputAnalogUI(this); } return(this.background); }
public void SetBackground(UIBackground background) { this.background = background; this.transform.SetAsLastSibling(); }