#Creating material in runtime

1 messages · Page 1 of 1 (latest)

valid blade
#

Yes, it is possible to create Material in runtime. You only need a shader

#

If you have a reference to the shader you can pass it directly to the material like so:

Material material = new Material(shader) 

Otherwise, you can use Shader.Find(name) to find the shader with specific name. Like so:

Material material = new Material(Shader.Find("Transparent/Diffuse"))