Unity-UI-Rounded-Corners icon indicating copy to clipboard operation
Unity-UI-Rounded-Corners copied to clipboard

Both rounded corner scripts stop working in the built application (Windows, Unity 2021.3.0f1)

Open PuFGGs opened this issue 3 years ago • 1 comments

When I used corner scripts in prefabs and Instantiate prefab in built runtime occurs an error and won't work. (It always works in the editor without any errors.)

PuFGGs avatar Apr 23 '22 14:04 PuFGGs

Hey, I had this issue too, the problem is that in both RoundedCorners scripts use Shader.Find("UI/RoundedCorners/RoundedCorners") and Shader.Find("UI/RoundedCorners/IndependentRoundedCorners") which can't work in a build, a workaround is to go into Project Settings -> Graphics -> Always Include Shaders, increment the value by 2 and add both shaders you can find inside Packages.

It would be nice if there was a script on load that automatically adds those but you can solve it simply by doing that

davide-aldegheri avatar Jun 15 '22 09:06 davide-aldegheri