コード例 #1
0
        void Awake()
        {
            try
            {
                if (hSelector == null)
                {
                    hSelector = gameObject.GetComponent <HorizontalSelector>();
                }

                if (UIManagerAsset == null)
                {
                    UIManagerAsset = Resources.Load <UIManager>("MUIP Manager");
                }

                this.enabled = true;

                if (UIManagerAsset.enableDynamicUpdate == false)
                {
                    UpdateSelector();
                    this.enabled = false;
                }
            }

            catch
            {
                Debug.Log("<b>[Modern UI Pack]</b> No UI Manager found, assign it manually.", this);
            }
        }
コード例 #2
0
        void OnEnable()
        {
            try
            {
                hSelector = gameObject.GetComponent <HorizontalSelector>();
            }

            catch { }

            if (UIManagerAsset == null)
            {
                try
                {
                    UIManagerAsset = Resources.Load <UIManager>("MUIP Manager");
                }

                catch
                {
                    Debug.LogWarning("No UI Manager found. Assign it manually, otherwise you'll get errors about it.", this);
                }
            }
        }
コード例 #3
0
 private void OnEnable()
 {
     // Set target
     hsTarget = (HorizontalSelector)target;
 }