Skip to content

Commit

Permalink
Revert "use instantiate instead of constructor to make new material"
Browse files Browse the repository at this point in the history
This reverts commit 4d1b349.
  • Loading branch information
drewcassidy committed Oct 25, 2024
1 parent 9641b09 commit 23b17cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/MaterialDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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 };
Expand Down

0 comments on commit 23b17cb

Please sign in to comment.