File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
RasterPropMonitor/Auxiliary modules Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,6 @@ class LabelBatch
210210
211211 public List < JSITextMesh > textMeshes = new List < JSITextMesh > ( ) ;
212212 public bool needsUpdate = true ;
213-
214213
215214 public LabelBatch ( JSILabel firstLabel )
216215 {
@@ -291,12 +290,14 @@ public void LateUpdate()
291290 }
292291
293292 readonly Dictionary < JSILabel . TextBatchInfo , LabelBatch > labelBatches = new Dictionary < JSILabel . TextBatchInfo , LabelBatch > ( ) ;
293+ RasterPropMonitorComputer rpmComp = null ;
294294
295295 public void AddStaticLabel ( JSILabel label )
296296 {
297297 LabelBatch labelBatch ;
298298 if ( ! labelBatches . TryGetValue ( label . batchInfo , out labelBatch ) )
299299 {
300+ rpmComp = label . rpmComp ;
300301 labelBatch = new LabelBatch ( label ) ;
301302 labelBatches . Add ( label . batchInfo , labelBatch ) ;
302303 // TODO: hook up flashing behavior
@@ -329,9 +330,8 @@ void LateUpdate()
329330
330331 void OnDestroy ( )
331332 {
332- if ( labelBatches . Count > 0 )
333+ if ( rpmComp != null )
333334 {
334- RasterPropMonitorComputer rpmComp = RasterPropMonitorComputer . FindFromProp ( internalProp ) ;
335335 foreach ( var labelBatch in labelBatches )
336336 {
337337 if ( labelBatch . Key . variableName != null )
You can’t perform that action at this time.
0 commit comments