Creating A Glass Material In Unity
Today I’ll create a transparent reflective material used for glass and windows in Unity.
Today’s Objective: Create a transparent reflective material for glass windows.
Create the material:
Create a new Material asset in the Project Files.
Set it as Transparent, Black color, 0.2 alpha, and 0.95 smoothness.
Apply the material to the GameObject:
On whichever GameObject you want to make glass, make sure it has a Mesh Filter and a Mesh Renderer component.
Grab the glass material we’ve just created, and apply it to the Mesh Renderer in the Materials tab. (My mesh takes 4 materials, so that’s why there are 4 elements in the Materials list below.)
The result:
The glass material looks great, and by adding some reflection probes and light to the scene, the window can show nice reflections too!