Skip to content

Commit d0cb5a7

Browse files
committed
Fix #117: lingering font rebuild issue
1 parent bad3b3c commit d0cb5a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

RasterPropMonitor/Auxiliary modules/PropBatcher.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ public void Rebuild()
292292
public void LateUpdate()
293293
{
294294
if (!needsUpdate) return;
295+
needsUpdate = false; // must do this early because regenerating the text can invalidate it again!
295296

296297
var worldToLocal = batchRoot.transform.worldToLocalMatrix;
297298
CombineInstance[] instances = new CombineInstance[textMeshes.Count];
@@ -306,8 +307,6 @@ public void LateUpdate()
306307
meshFilter.mesh.Clear();
307308
meshFilter.mesh.CombineMeshes(instances);
308309
meshFilter.mesh.UploadMeshData(false);
309-
310-
needsUpdate = false;
311310
}
312311
}
313312

0 commit comments

Comments
 (0)