Пример #1
0
        static void Init()
        {
            VMEMainWindow window = (VMEMainWindow)EditorWindow.GetWindow(typeof(VMEMainWindow));

            Instance = window;

            //create background color.
            tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
            tex.SetPixel(0, 0, new Color(0.25f, 0.25f, 0.25f, 1));
            tex.Apply();

            window.Show();
            window.titleContent.text = "VME";

            settingsObject = VMESettingsObject.LoadScriptableObject();
            mainPanel      = new VMEMainPanel(window, settingsObject.TOGGLE_EDITOR);
            swatchPanel    = new VMEVoxelSwatchPanel(window, settingsObject.ENABLE_SWATCH);
            fileManager    = new VMEFileManagerPanel(window, settingsObject.ENABLE_FILEMANAGER);
            modePanel      = new VMEModePanel(window, settingsObject.ENABLE_MODE, swatchPanel);
            chunkPanel     = new VMEChunkPanel(window, settingsObject.ENABLE_CHUNK);
            selectionPanel = new VMESelectionPanel();
        }
Пример #2
0
        static void Init () {

            VMEMainWindow window = (VMEMainWindow)EditorWindow.GetWindow(typeof(VMEMainWindow));
            Instance = window;

            //create background color.
            tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
            tex.SetPixel(0, 0, new Color(0.25f, 0.25f, 0.25f, 1));
            tex.Apply();

            window.Show();
            window.titleContent.text = "VME";

            settingsObject = VMESettingsObject.LoadScriptableObject();
            mainPanel = new VMEMainPanel(window, settingsObject.TOGGLE_EDITOR);
            swatchPanel = new VMEVoxelSwatchPanel(window, settingsObject.ENABLE_SWATCH);
            fileManager = new VMEFileManagerPanel(window, settingsObject.ENABLE_FILEMANAGER);
            modePanel = new VMEModePanel(window, settingsObject.ENABLE_MODE, swatchPanel);
            chunkPanel = new VMEChunkPanel(window, settingsObject.ENABLE_CHUNK);
            selectionPanel = new VMESelectionPanel();

            

        }