public void EndNewAssetCreationCanceled(string name)
        {
            string path = folder + "/" + name + extension;

            ProjectWindowUtil.EndNameEditAction(m_EndAction, m_InstanceID, path, m_ResourceFile, false);
        }
Beispiel #2
0
 public override void OnInspectorGUI()
 {
     base.serializedObject.ApplyModifiedProperties();
     EditorGUILayout.PropertyField(this.m_PreloadedShaders, true, new GUILayoutOption[0]);
     EditorGUILayout.Space();
     GUILayout.Label($"Currently tracked: {ShaderUtil.GetCurrentShaderVariantCollectionShaderCount()} shaders {ShaderUtil.GetCurrentShaderVariantCollectionVariantCount()} total variants", new GUILayoutOption[0]);
     EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     if (GUILayout.Button(Styles.shaderPreloadSave, EditorStyles.miniButton, new GUILayoutOption[0]))
     {
         string message = "Save shader variant collection";
         string str2    = EditorUtility.SaveFilePanelInProject("Save Shader Variant Collection", "NewShaderVariants", "shadervariants", message, ProjectWindowUtil.GetActiveFolderPath());
         if (!string.IsNullOrEmpty(str2))
         {
             ShaderUtil.SaveCurrentShaderVariantCollection(str2);
         }
         GUIUtility.ExitGUI();
     }
     if (GUILayout.Button(Styles.shaderPreloadClear, EditorStyles.miniButton, new GUILayoutOption[0]))
     {
         ShaderUtil.ClearCurrentShaderVariantCollection();
     }
     EditorGUILayout.EndHorizontal();
     base.serializedObject.ApplyModifiedProperties();
 }