• Unity
  • 5.2 breaking changes for materials?

Related Discussions
...

I saw in the release notes for the newly released Unity 5.2 the following:

Shaders: Can not create fixed function shaders using "new Material(string)" anymore. Shaders must come from assets or be fully precompiled in the editor

It looks like Spine was doing this ... will this upgrade to 5.2 be Spine breaking?

The full release notes for Unity 5.2 can be found here:
http://unity3d.com/unity/whats-new/unity-5.2

colinday wrote

I saw in the release notes for the newly released Unity 5.2 the following:

Shaders: Can not create fixed function shaders using "new Material(string)" anymore. Shaders must come from assets or be fully precompiled in the editor

It looks like Spine was doing this ... will this upgrade to 5.2 be Spine breaking?

The full release notes for Unity 5.2 can be found here:
http://unity3d.com/unity/whats-new/unity-5.2

I want to know the same :/

9 dana kasnije

@colinday What makes you think Spine does this?

Also, I haven't noticed it break in 5.2.

Shouldn't be doing that anywhere. We might be using Material mat = new Material(Shader.Find("Spine/Skeleton")) but not generating a new material from a string... nope.

5 dana kasnije

My mistake ... I was only questioning it because I saw within the code things such as

_boneMaterial = new Material(Shader.Find("Particles/Alpha Blended"));

But if that's still OK, then no worries.

Where the hell is that code? O.o

SpineEditorUtilities file.

Just to be clear. The string argument in new Material(string) is whole shaderlab code. Not a shader name.

Unity 5.2 is dropping support for non-precompiled shaders (at least here) for the sake of compatiblity with some consoles or something, so compiling shaderlab code at runtime like that won't work anymore.

But Spine-Unity doesn't do that anywhere, so there's nothing to worry about.