We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a9f79f commit 4d1b349Copy full SHA for 4d1b349
Source/MaterialDef.cs
@@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License
21
using System.Runtime.CompilerServices;
22
using HarmonyLib;
23
using UnityEngine;
24
+using Object = UnityEngine.Object;
25
26
namespace Shabby
27
{
@@ -147,7 +148,7 @@ public Material Instantiate(Material referenceMaterial)
147
148
149
Material material;
150
if (updateExisting) {
- material = new Material(referenceMaterial);
151
+ material = Object.Instantiate(referenceMaterial);
152
if (shader != null) material.shader = shader;
153
} else {
154
material = new Material(shader) { name = referenceMaterial.name };
0 commit comments