Skip to content

Commit 23b17cb

Browse files
committed
Revert "use instantiate instead of constructor to make new material"
This reverts commit 4d1b349.
1 parent 9641b09 commit 23b17cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/MaterialDef.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
2121
using System.Runtime.CompilerServices;
2222
using HarmonyLib;
2323
using UnityEngine;
24-
using Object = UnityEngine.Object;
2524

2625
namespace Shabby
2726
{
@@ -148,7 +147,7 @@ public Material Instantiate(Material referenceMaterial)
148147

149148
Material material;
150149
if (updateExisting) {
151-
material = Object.Instantiate(referenceMaterial);
150+
material = new Material(referenceMaterial);
152151
if (shader != null) material.shader = shader;
153152
} else {
154153
material = new Material(shader) { name = referenceMaterial.name };

0 commit comments

Comments
 (0)