Hello. I have prefab with transparent material which I instanciating at runtime many times. If instanced objectes overlay each other then I have bug like z-fighting. Changing renderQueue fixs this situation but it seems break batching. If any way to change renderQueue with save connection to prefab for object?
Render queue will absolutely break batching, there’s no way around that. Use sorting order instead:
This should work on all renderers, though it’s only exposed (and saved) on SpriteRenderer components in the editor, but that shouldn’t be a problem for you since it sounds like you’re going to be setting this via script at runtime anyway.
Thanks!)