Skip to content

Commit 8193bc5

Browse files
committed
emissive changes should touch sharedmaterial, not instanced material
1 parent f199d3f commit 8193bc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RasterPropMonitor/Auxiliary modules/PropBatcher.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Reflection.Emit;
@@ -261,9 +261,9 @@ public void VariableChangedCallback(float value)
261261
}
262262
}
263263

264-
if (newEmissive != renderer.material.GetFloat(JSILabel.emissiveFactorIndex))
264+
if (newEmissive != renderer.sharedMaterial.GetFloat(JSILabel.emissiveFactorIndex))
265265
{
266-
renderer.material.SetFloat(JSILabel.emissiveFactorIndex, newEmissive);
266+
renderer.sharedMaterial.SetFloat(JSILabel.emissiveFactorIndex, newEmissive);
267267
}
268268
}
269269

0 commit comments

Comments
 (0)