コード例 #1
0
ファイル: UIManagerDropdown.cs プロジェクト: cello90/GGJ2020
        void OnEnable()
        {
            try
            {
                dropdownMain = gameObject.GetComponent <CustomDropdown>();
            }

            catch { }

            if (dropdownMain == null)
            {
                dropdownMulti = gameObject.GetComponent <DropdownMultiSelect>();
            }

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

                catch
                {
                    Debug.Log("No UI Manager found. Assign it manually, otherwise you'll get errors about it.");
                }
            }
        }
コード例 #2
0
        void Awake()
        {
            try
            {
                if (dropdownMain != null)
                {
                    dropdownMain = gameObject.GetComponent <CustomDropdown>();
                }
                else
                {
                    dropdownMulti = gameObject.GetComponent <DropdownMultiSelect>();
                }

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

                this.enabled = true;

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

            catch
            {
                Debug.Log("<b>[Modern UI Pack]</b> No UI Manager found, assign it manually.", this);
            }
        }
コード例 #3
0
 private void OnEnable()
 {
     // Set target
     dropdownTarget = (CustomDropdown)target;
 }
コード例 #4
0
 private void OnEnable()
 {
     dTarget = (CustomDropdown)target;
 }