Duplicated Shaders

Hello,

A warning or maybe even an error would be great if duplicated shaders are found, same as it is happening for scripts. It would really save some time when it’s happening :slight_smile:

Thank you!

3 Likes

Hi!
Can you please expand a bit on what exactly you mean by “duplicated”?

Hi. Sure, I refer to shaders having the same internal name.

Right now, the material is showing that both shaders are selected, because their internal name is the same:

OK, looks like this is allowed right now to make it possible to override builtin shaders - Shader.Find will use the one supplied in the project.
I think this is a valid use case.
Now, having two shaders with the same name in the project probably doesn’t make sense :slight_smile:
I also think this should be treated as a bug, because the order is not guaranteed, so you can get either shader using Shader.Find.
May I ask you to file a bug report? We can make it issue a warning when two shaders in the project use the same name.

I was thinking this might be the case. I will file a bug report later and get back with the case number. Thanks!

(Case 1377675) Duplicated internal names for shaders

1 Like