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 UIForeground GetForeground() { if (this.foreground == null) { this.foreground = Helper .Instantiator .InstantiateAsComponent <UIForeground>(); this.foreground.SetMobileInputAnalogUI(this); this.foreground.SetBackground(this.GetBackground()); } return(this.foreground); }