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

            return(this.background);
        }
Пример #3
0
 public void SetBackground(UIBackground background)
 {
     this.background = background;
     this.transform.SetAsLastSibling();
 }