From 23b17cb8d3802b73e723e1bb736200661e7ac150 Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Thu, 24 Oct 2024 18:38:07 -0700 Subject: [PATCH] Revert "use instantiate instead of constructor to make new material" This reverts commit 4d1b34919c904922e9ed7deb5c705153f3281feb. --- Source/MaterialDef.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 };