mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-28 18:25:18 +00:00
only preserve render queue and override tag if it differs from the shader's one (so we dont fuck up dummy shaders, which dont have those things set)
This commit is contained in:
parent
d40eff9dcf
commit
bd6aca5c88
@ -29,11 +29,14 @@ public static class ShaderReplacer
|
||||
|
||||
// preserve override tag and render queue (for Standard shader)
|
||||
// keywords and properties are already preserved
|
||||
var renderType = material.GetTag("RenderType", false);
|
||||
var renderQueue = material.renderQueue;
|
||||
material.shader = replacementShader;
|
||||
material.SetOverrideTag("RenderType", renderType);
|
||||
material.renderQueue = renderQueue;
|
||||
if (material.renderQueue != material.shader.renderQueue)
|
||||
{
|
||||
var renderType = material.GetTag("RenderType", false);
|
||||
var renderQueue = material.renderQueue;
|
||||
material.shader = replacementShader;
|
||||
material.SetOverrideTag("RenderType", renderType);
|
||||
material.renderQueue = renderQueue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user