private void UpdateTitle()
        {
            // load JEM editor resources
            JEMEditorResources.Load();

            titleContent = new GUIContent("JEM Build", JEMEditorResources.JEMIconTexture);
        }
Ejemplo n.º 2
0
        private void OnEnable()
        {
            // Load JEM editor resources
            JEMEditorResources.Load();

            // Apply Title
            titleContent = new GUIContent("JEM Configuration", JEMEditorResources.JEMIconTexture);

            // Load all configurations
            InternalJEMConfiguration.Load();
            JEMEditorConfiguration.Load();
            JEMAssetsBuilderConfiguration.Load();
        }
        private void OnEnable()
        {
            // Load JEM editor resources
            JEMEditorResources.Load();

            // Apply title
            titleContent = new GUIContent("JEM Asset Builder", JEMEditorResources.JEMIconTexture);

            // Try to load configuration.
            JEMAssetsBuilderConfiguration.TryLoadConfiguration();

            // Load Saved vars.
            _assetsScroll   = new SavedVector2($"{nameof(JEMAssetBuilderWindow)}.AssetsScroll", Vector2.zero);
            _packagesScroll = new SavedVector2($"{nameof(JEMAssetBuilderWindow)}.PackagesScroll", Vector2.zero);

            // Load packages!
            LoadPackages();
        }
Ejemplo n.º 4
0
        private void OnGUI()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Width(126));
            {
                SelectedTab = GUILayout.SelectionGrid(SelectedTab, Tabs, 1);
                GUILayout.FlexibleSpace();

                var drawSave = false;
                switch (SelectedTab)
                {
                case 0:
                    break;

                case 1:
                    if (GUILayout.Button("Force Reload\nJEM Resources", GUILayout.Height(40)))
                    {
                        JEMEditorResources.Load(true);
                    }
                    drawSave = true;
                    break;

                case 2:
                case 3:
                    drawSave = true;
                    break;
                }

                if (drawSave)
                {
                    if (GUILayout.Button("Save"))
                    {
                        SaveConfigurationData();
                    }
                }
            }
            EditorGUILayout.EndVertical();

            EditorGUILayout.BeginVertical(EditorStyles.helpBox);
            {
                switch (SelectedTab)
                {
                case 0:     // About
                    OnAboutGUI();
                    break;

                case 1:     // Core Settings
                    OnCoreSettingsGUI();
                    break;

                case 2:     // Editor Settings
                    OnEditorSettingsGUI();
                    break;

                case 3:     // AssetBundles Settings
                    OnAssetBundlesSettingsGUI();
                    break;

                default:
                    EditorGUILayout.HelpBox("You are trying to draw page that not exist or is implemented yet :/",
                                            MessageType.Error, true);
                    break;
                }
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
        }