Skip to content

Commit f53df7c

Browse files
authored
Ensure MaterialInstance copies all properties from source (#222)
Added a call to `output.CopyPropertiesFromMaterial(source)` in the `Instance` method of `MaterialInstance.cs`. This ensures that the newly created `output` material inherits all properties from the `source` material, maintaining consistency between them.
1 parent 48bf0c3 commit f53df7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

com.microsoft.mrtk.graphicstools.unity/Runtime/Utilities/MaterialInstance.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public static Material Instance(Material source)
5151
}
5252

5353
Material output = new Material(source);
54+
output.CopyPropertiesFromMaterial(source);
5455
output.name += InstancePostfix;
5556

5657
return output;

0 commit comments

Comments
 (0)