File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,11 @@ private static void ApplyDefaultTextures(List<ShaderContext> contexts)
803803 {
804804 var importedShader = AssetImporter . GetAtPath ( $ "{ context . FilePath } /" + context . VariantFileName ) as ShaderImporter ;
805805 var customTextures = context . Modules . SelectMany ( x => x . Properties ) . Where ( x => x . DefaultTextureAsset != null ) . ToList ( ) ;
806- if ( importedShader != null ) importedShader . SetDefaultTextures ( customTextures . Select ( x => x . Name ) . ToArray ( ) , customTextures . Select ( x => x . DefaultTextureAsset ) . ToArray ( ) ) ;
806+ if ( importedShader != null )
807+ {
808+ importedShader . SetDefaultTextures ( customTextures . Select ( x => x . Name ) . ToArray ( ) , customTextures . Select ( x => x . DefaultTextureAsset ) . ToArray ( ) ) ;
809+ importedShader . SetNonModifiableTextures ( customTextures . Select ( x => x . Name ) . ToArray ( ) , customTextures . Select ( x => x . DefaultTextureAsset ) . ToArray ( ) ) ;
810+ }
807811 AssetDatabase . ImportAsset ( $ "{ context . FilePath } /" + context . VariantFileName ) ;
808812 }
809813 }
You can’t perform that action at this time.
0 commit comments