Skip to content

Commit 47326e3

Browse files
committed
Fixed Default Textures from Modular Shader props werent applied
- ApplyDefaultTextures function was only grabbing textures from the modules, but not the Shader's props themselves, this little fix addresses that
1 parent c4bcdcc commit 47326e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Editor/ShaderGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ private static void ApplyDefaultTextures(List<ShaderContext> contexts)
849849
{
850850
var importedShader = AssetImporter.GetAtPath($"{context.FilePath}/" + context.VariantFileName) as ShaderImporter;
851851
var customTextures = context.Modules.SelectMany(x => x.Properties).Where(x => x.DefaultTextureAsset != null).ToList();
852+
customTextures.AddRange(context.Shader.Properties.Where(x => x.DefaultTextureAsset != null).ToList());
852853
if (importedShader != null)
853854
{
854855
importedShader.SetDefaultTextures(customTextures.Select(x => x.Name).ToArray(), customTextures.Select(x => x.DefaultTextureAsset).ToArray());

0 commit comments

Comments
 (0)