Skip to main content

MaterialInstantiator

A class in Root.Township, the global namespace.

Gives each renderer on its object its own copy of its material when it wakes, so changes do not affect other objects.

Constructors​

MemberWhat it is
MaterialInstantiator()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Methods​

1 private and internal method
MemberWhat it is
private void Awake()Replaces each renderer's shared material with a new copy.