Syncing Material Properties (Unity)

Understanding how Unity handles material editing can influence your choice of components and scene hierarchy setup. To simplify this process, we offer various No-Code components for synchronizing material properties out of the box.

image-20240305-053617.png
Several different ways of modifying material properties are possible.

Sync Instance Materials

The SyncMaterialInstanceColor component selectively updates only the instance of a material assigned to a renderer, without impacting other instances. It's ideal for scenarios where you need to synchronize specific instances while maintaining independence for others.

 

image-20240305-165838.png
All three cylinders use the same material, however, the left object is not assigned a sync component and will not receive changes from modifying the center object’s instanced material.

 

Sync Shared Materials

The SyncMaterialSharedColor component allows for easy color synchronization across objects sharing the same material without extra sync components. Any changes made to its properties affect all corresponding objects in the scene.

 

 

 

Syncing Material Textures

The SyncMaterialTexture component facilitates texture synchronization through a serialized collection of textures, using a key-value pair of string::texture. Swapping textures within this collection provides synchronization of textures.

 

 

 

 

Syncing Image Sprites

With the SyncImageSprite component, you can synchronize sprites similar to material textures mentioned above. Just populate the serialized list with the desired sprites, and you can easily swap sprites either manually or programmatically to sync.

 

 

 

 

Custom Materials

It's important to note that the components mentioned above are exclusively compatible with Unity URP materials and shaders. In cases where custom materials with unique shaders are utilized, additional considerations are necessary. For developers, we offer more detailed guidance in our developer section, where custom component examples are provided to address such scenarios.

Â