Exemple #1
0
        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();
        }
Exemple #2
0
        public UIBackground GetBackground()
        {
            if (this.background == null)
            {
                this.background = Helper
                                  .Instantiator
                                  .InstantiateAsComponent <UIBackground>();
                this.background.SetMobileInputAnalogUI(this);
            }

            return(this.background);
        }
Exemple #3
0
 public void SetBackground(UIBackground background)
 {
     this.background = background;
     this.transform.SetAsLastSibling();
 }