Skip to content

Commit ee611ce

Browse files
committed
Fixed issue with optimized shader assignment to material
1 parent e502d10 commit ee611ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Editor/ShaderGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ public static void GenerateMinimalShaders(this List<ShaderContext> contexts)
220220
EditorUtility.DisplayProgressBar("Generating Optimized Shaders", "waiting for unity to compile shaders", contexts.Count - 2 / (contexts.Count + 3));
221221
// To make sure the AssetDatabase doesn't break out
222222
AssetDatabase.StopAssetEditing();
223+
AssetDatabase.Refresh();
223224
}
224225

225226
EditorUtility.DisplayProgressBar("Generating Optimized Shaders", "applying shaders to materials", contexts.Count - 1 / (contexts.Count + 3));
@@ -228,7 +229,6 @@ public static void GenerateMinimalShaders(this List<ShaderContext> contexts)
228229
context.Material.shader = Shader.Find(context.ShaderName);
229230
}
230231

231-
AssetDatabase.Refresh();
232232
EditorUtility.ClearProgressBar();
233233
}
234234

0 commit comments

Comments
 (0)