- Home /
SRP URP Changing values of a material being shared by many objects in the Editor
So guys, Im trying to change the color of objects to preview them in the editor. All the objects share a same material with only the color value being changed, the color value is unique to each object.
Previously when I was using the Legacy Render Pipeline i used MaterialPropertyBlocks for this but in Scriptable Render Pipeline(in my case, URP), material Property Blocks breaks batching when using the SRP batcher, and changing color by using material.SetColor() function creates an instance of the material in the editor and on hitting play and then changing color by using material.SetColor() creates and instance of the instanced material.
Currently i have to use a hacked method of using propertyblocks in editor and then in runtime removing the materialPropertyBlock afrer copying its values to the material, but this seems inefficient and i guess there is a better was to do this that i dont know of.
Can someone give me a better to do this?
Thanks in advance guys.
hey so did you find any solution to this? $$anonymous$$d sharing if you did?
Your answer
Follow this Question
Related Questions
Changing colors of a material 1 Answer
How to save emissive Material assets using "_EMISSION" keyword by script? 1 Answer
Problem with rendering after using localScale 0 Answers
unwanted pale shadow like,at the edje of gameobject in high speed 0 Answers
Environment Material Disappears after ingame level restart 0 Answers