Complete the code to create a new material with a shader.
Material mat = new Material(Shader.[1]("Standard"));
The Shader.Find method locates a shader by name to assign it to a material.
Complete the code to assign a texture to the material's main texture slot.
mat.[1] = myTexture;The mainTexture property sets the main texture of a material.
Fix the error in the code to change the color of the material.
mat.color = new Color([1], 0.5f, 0.5f);
Color values must be floats between 0 and 1, so 1.0f is correct.
Fill both blanks to create a material and assign a texture property by name.
Material mat = new Material(Shader.[1]("Standard")); mat.[2]("_MainTex", myTexture);
Use Shader.Find to get the shader and SetTexture to assign a texture by property name.
Fill all three blanks to create a material, set its color, and assign a texture.
Material mat = new Material(Shader.[1]("Standard")); mat.[2] = new Color(1.0f, 0.0f, 0.0f); mat.[3] = myTexture;
Use Shader.Find to get the shader, set the color property for red, and assign the mainTexture property.
