Example #1
0
        private void OnGUIMaterial()
        {
            if (string.IsNullOrEmpty(_materialAssetRootDirectory))
            {
                UpdaterHelper.UpdateAssetPath(out _materialAssetRootDirectory, out _materialFullRootDirectory, "Assets");
            }

            var originalColor = GUI.contentColor;

            GUI.contentColor = Color.yellow;
            if (GUILayout.Button("Select Root Directory..."))
            {
                var materialPaths = OnGUISelectMaterialPaths();

                if (materialPaths != null && materialPaths.Count > 0)
                {
                    ResetLogMessage();
                    UpdateMaterials(materialPaths);
                    GenerateLogMessage();
                }
            }
            GUI.contentColor = originalColor;

            EditorGUILayout.LabelField("Material Root Directory:", _materialAssetRootDirectory);
        }
Example #2
0
        private void OnGUIConfig()
        {
            if (string.IsNullOrEmpty(_configDataAssetPath))
            {
                UpdaterHelper.UpdateAssetPath(out _configDataAssetPath, out _configDataFullPath, CONFIG_DEFAULT_ASSET_PATH);
                _isConfigChanged = true;
            }

            var originalColor = GUI.contentColor;

            GUI.contentColor = Color.green;
            if (GUILayout.Button("Select Config Path..."))
            {
                _configDataFullPath  = EditorUtility.OpenFilePanel("Config File Path", _configDataFullPath, "json");
                _configDataAssetPath = UpdaterHelper.GetAssetRelativePath(_configDataFullPath);
                _isConfigChanged     = true;
            }
            GUI.contentColor = originalColor;

            EditorGUILayout.LabelField("Config File Path: ", _configDataAssetPath);

            LoadConfig();
        }