Skip to content

Commit

Permalink
Fix #117: lingering font rebuild issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan committed Nov 10, 2023
1 parent bad3b3c commit d0cb5a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions RasterPropMonitor/Auxiliary modules/PropBatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ public void Rebuild()
public void LateUpdate()
{
if (!needsUpdate) return;
needsUpdate = false; // must do this early because regenerating the text can invalidate it again!

var worldToLocal = batchRoot.transform.worldToLocalMatrix;
CombineInstance[] instances = new CombineInstance[textMeshes.Count];
Expand All @@ -306,8 +307,6 @@ public void LateUpdate()
meshFilter.mesh.Clear();
meshFilter.mesh.CombineMeshes(instances);
meshFilter.mesh.UploadMeshData(false);

needsUpdate = false;
}
}

Expand Down

0 comments on commit d0cb5a7

Please sign in to comment.