0
0
Unityframework~5 mins

Material properties in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Material in Unity?
A Material in Unity defines how a surface looks by controlling its color, texture, and how it reacts to light.
Click to reveal answer
beginner
How do you change the color of a Material in Unity using code?
You can change the color by accessing the Material's color property, for example: <br>material.color = Color.red;
Click to reveal answer
intermediate
What is the difference between a Material and a Shader in Unity?
A Shader is a program that tells the computer how to draw something. A Material uses a Shader and sets its properties like color or texture.
Click to reveal answer
intermediate
How can you access a Material's texture property in Unity?
You can get or set a texture using: <br>material.mainTexture or material.SetTexture("_MainTex", texture);
Click to reveal answer
advanced
What happens if you modify a Material directly on a Renderer component in Unity?
Modifying a Material directly on a Renderer changes the shared Material for all objects using it. To change only one object, use renderer.material to get a unique copy.
Click to reveal answer
Which property would you use to change the main color of a Material in Unity?
Amaterial.color
Bmaterial.texture
Cmaterial.shader
Dmaterial.light
What does a Shader do in Unity?
AStores textures only
BDefines how a surface looks by controlling light and color
CIs the same as a Material
DControls the physics of an object
How do you get a unique copy of a Material from a Renderer to modify it without affecting others?
Arenderer.material
Brenderer.sharedMaterial
Crenderer.getMaterial()
Drenderer.copyMaterial
Which method sets a texture property on a Material?
Amaterial.GetTexture("_MainTex")
Bmaterial.SetColor("_MainTex", color)
Cmaterial.SetTexture("_MainTex", texture)
Dmaterial.ApplyTexture(texture)
If you want to change the look of all objects sharing the same Material, what should you modify?
AThe Renderer component
BThe material property
CThe MeshFilter
DThe sharedMaterial
Explain how Materials and Shaders work together in Unity to create the appearance of an object.
Think about how a recipe (Shader) and ingredients (Material) combine.
You got /3 concepts.
    Describe the difference between modifying 'material' and 'sharedMaterial' on a Renderer component.
    Consider if you want to change one object or many.
    You got /3 concepts.