Unity Introduces Material Variants

void1gaming
3 min readAug 4, 2022

Like Prefabs, now you can create variants of Materials with local custom settings in Unity 2021.1.

Unity Introduces Material Variants

Prefabs have been a great life saver and a performance booster for all the Unity developers. It is well known for the scalability and efficient workflow that helps the developers immensely during the development process. Just like the Prefabs workflow, now Unity finally introduced Material Variants with a similar concept possessing a great potential to speed up iterations, reuse, enhance asset library and help collaborate with artists more uniformly. This works with all the render pipelines available and it can be integrated into any project on the Unity version 2022.1 or greater.

Back then, Unity used the concept of shared materials where developers were not allowed to keep custom local changes for different materials even though there was the need for just minor changes in value. Developers need to create a duplicate or else a completely new material for having a minor parametric change which was undoubtedly inefficient. This was not only increasing the material count but also it was hard to manage such a huge library of redundant material. There are higher chances, especially for beginners to mess up the material linking, as many assets in the game might have been linked with a single material, and developers might be changing the local values of the material by going through each asset, which ultimately changing the main material itself for all other assets as well. Now to cut the way short, Unity finally brings on the ability to create the variants of the materials with a similar concept to prefabs for better efficient workflow.

Material Variant feature in Unity

The new material variants feature allows the developers to create several templates that can be reused and overridden wherever required with local changes. The base template holds the common parameters/settings which can be overridden locally and reused as per the need. Additionally, developers can also lock and protect some of the specific properties that they do not want to be overridden. This workflow works best for anyone creating materials from a shader graph having several properties that are required to be changed for specific assets and purposes. For example, we made a water shader, now this water shader is dynamically created inside the shader graph in such a way that we can change the type of water using an Enum. So, we will populate our scene with water material wherever required, and now depending on the situation, we will use running water in the drains and still water for ponds. And all these settings are just a click away, we just need to go to individual materials and change the type of water which will technically override the base settings of the water. Super simple and fast to achieve such specific instances.

Get to know more on the creation of Material Variants.

With Love From VOiD1 Gaming

VOiD1 Gaming

**VOiD1 Gaming is not sponsored by the above company. All trademarks appearing above are registered trademarks of the respective company.**

--

--

void1gaming

Passionate Indie Game Developers creating Games, Assets, Tutorials, Blogs, Informative Contents that you’d love!!