diff --git a/Source/MaterialDef.cs b/Source/MaterialDef.cs index 9ef480e..fa0360e 100644 --- a/Source/MaterialDef.cs +++ b/Source/MaterialDef.cs @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License using System.Runtime.CompilerServices; using HarmonyLib; using UnityEngine; -using Object = UnityEngine.Object; namespace Shabby { @@ -148,7 +147,7 @@ public Material Instantiate(Material referenceMaterial) Material material; if (updateExisting) { - material = Object.Instantiate(referenceMaterial); + material = new Material(referenceMaterial); if (shader != null) material.shader = shader; } else { material = new Material(shader) { name = referenceMaterial.name };