Creating A Glass Material In Unity

Today I’ll create a transparent reflective material used for glass and windows in Unity.

Vincent Taylor
Sep 29, 2021

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!

There is no skybox active here, so the outside is empty. This just shows reflections.

--

--

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.