Creating Shader Object from text?

There’s used to be a constructor for the shader class that would allow you to create a shader passing it’s shader text. It was removed some versions ago but now I actually need to create a shader object from a given text.

How can I do this now?

Use the old version of Unity where that was still supported.

The text constructor wasn’t only removed - that functionality was completely purged from the engine. So it’s not possible to create shaders at runtime at all.

Uau, that sucks, I will need to find a workaround for my case since I cant use an older version. Do you know why it was removed?

thx for the answer