UnityEditor.ShaderUtil.SaveCurrentShaderVariantCollection C# (CSharp) Method

SaveCurrentShaderVariantCollection() private method

private SaveCurrentShaderVariantCollection ( string path ) : void
path string
return void
        internal static extern void SaveCurrentShaderVariantCollection(string path);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

示例#1
0
 private void ShaderPreloadGUI()
 {
     EditorGUILayout.Space();
     GUILayout.Label(GraphicsSettingsInspector.Styles.shaderPreloadSettings, EditorStyles.boldLabel, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_PreloadedShaders, true, new GUILayoutOption[0]);
     EditorGUILayout.Space();
     GUILayout.Label(string.Format("Currently tracked: {0} shaders {1} total variants", ShaderUtil.GetCurrentShaderVariantCollectionShaderCount(), ShaderUtil.GetCurrentShaderVariantCollectionVariantCount()), new GUILayoutOption[0]);
     EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     if (GUILayout.Button(GraphicsSettingsInspector.Styles.shaderPreloadSave, EditorStyles.miniButton, new GUILayoutOption[0]))
     {
         string message = "Save shader variant collection";
         string text    = EditorUtility.SaveFilePanelInProject("Save Shader Variant Collection", "NewShaderVariants", "shadervariants", message, ProjectWindowUtil.GetActiveFolderPath());
         if (!string.IsNullOrEmpty(text))
         {
             ShaderUtil.SaveCurrentShaderVariantCollection(text);
         }
         GUIUtility.ExitGUI();
     }
     if (GUILayout.Button(GraphicsSettingsInspector.Styles.shaderPreloadClear, EditorStyles.miniButton, new GUILayoutOption[0]))
     {
         ShaderUtil.ClearCurrentShaderVariantCollection();
     }
     EditorGUILayout.EndHorizontal();
 }
All Usage Examples Of UnityEditor.ShaderUtil::SaveCurrentShaderVariantCollection