Material.Material
void Material(Shader shader)
Creates a material from a shader, and uses the shader’s default settings. If the shader is null, a warning will be added to the log, and this Material will default to using an Unlit shader. Uses an auto-generated id.
Shader shader | Any valid shader, null is okay, but will log a warning and default to Unlit. |
void Material(string shaderFilename)
Loads a Shader asset and creates a Material using it. If the shader fails to load, a warning will be added to the log, and this Material will default to using an Unlit shader. Uses an auto-generated id.
string shaderFilename | The filename of a Shader asset. If the file is not present, the Shader will default to Unlit. |
void Material(string id, string shaderFilename)
Loads a Shader asset and creates a Material using it. If the shader fails to load, a warning will be added to the log, and this Material will default to using an Unlit shader. Uses an auto-generated id.
string id | Set the material’s id to this. |
string shaderFilename | The filename of a Shader asset. If the file is not present, the Shader will default to Unlit. |
void Material(string id, Shader shader)
Creates a material from a shader, and uses the shader’s default settings. If the shader is null, a warning will be added to the log, and this Material will default to using an Unlit shader.
string id | Set the material’s id to this. |
Shader shader | Any valid shader, null is okay, but will log a warning and default to Unlit. |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!