Exemplo n.º 1
0
        /** OnEnable
         */
        private void OnEnable()
        {
            UnityEngine.Debug.Log("Window.OnEnable");

            //ヘッド。
            {
                UnityEngine.UIElements.Box t_head_box = new UnityEngine.UIElements.Box();
                {
                    //クリア。
                    {
                        UnityEngine.UIElements.Button t_button = new UnityEngine.UIElements.Button(() => {
                            DebugConsole.Clear();
                        });
                        t_button.text          = "Clear";
                        this.head_clear_button = t_button;
                        t_head_box.Add(t_button);
                    }

                    //テスト1。
                    {
                        UnityEngine.UIElements.Button t_button = new UnityEngine.UIElements.Button(() => {
                            DebugConsole.Log("Assets/ThirdParty/Open/Fee/Script/DebugConsole/ListItemEvent.cs(51):テスト");
                        });
                        t_button.text          = "LogReCreate";
                        this.head_test1_button = t_button;
                        t_head_box.Add(t_button);
                    }

                    //テスト2。
                    {
                        UnityEngine.UIElements.Button t_button = new UnityEngine.UIElements.Button(() => {
                            DebugConsole.Log("Assets/ThirdParty/Open/Fee/Script/DebugConsole/ListItemEvent.cs(51)");
                        });
                        t_button.text          = "LogAdd";
                        this.head_test2_button = t_button;
                        t_head_box.Add(t_button);
                    }
                }
                this.head_box = t_head_box;
                this.rootVisualElement.Add(t_head_box);
            }

            //リスト。
            {
                UnityEngine.UIElements.ListView t_listview = new UnityEngine.UIElements.ListView(Data.GetList(), 64, s_func_makeitem, s_func_binditem);
                {
                    t_listview.style.flexGrow = 1.0f;
                    t_listview.selectionType  = UnityEngine.UIElements.SelectionType.Single;
                }
                this.rootVisualElement.Add(t_listview);
            }
        }
        public ScriptUpdater(UpdatedReferenceAddressBook updatedReferenceAddressBook, Button updateScriptsButton)
        {
            _updatedReferenceAddressBook    = updatedReferenceAddressBook;
            _fieldsToUpdateByFieldOwnerType = new Dictionary <Type, List <FieldInformation> >();

            updateScriptsButton.clicked += () =>
            {
                RunReplaceLogic();
            };
        }
Exemplo n.º 3
0
        public ComponentReplacer(UpdatedReferenceAddressBook updatedReferenceAddressBook, Button updateComponentsButton)
        {
            _updatedReferenceAddressBook = updatedReferenceAddressBook;
            _fontAssetMap = AssetDatabase.LoadAssetAtPath(FONT_ASSET_MAP_PATH, typeof(FontAssetMap)) as FontAssetMap;

            updateComponentsButton.clicked += () =>
            {
                RunReplaceLogic();
            };
        }