Skip to content

Commit d6a70ca

Browse files
committed
Fixed bug when adding/removing lots of objects
Fixed bug when adding/removing lots of objects
1 parent 1690431 commit d6a70ca

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

TrueTrace.unitypackage

-2.62 KB
Binary file not shown.

TrueTrace/Resources/AssetManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,10 @@ private void UpdateRenderAndBuildQues() {
853853
QueCount = UpdateQue.Count;
854854
for (int i = QueCount - 1; i >= 0; i--) {//Demotes from Render Que to Build Que in case mesh has changed
855855
if (UpdateQue[i] != null && UpdateQue[i].gameObject.activeInHierarchy) {
856-
if (UpdateQue[i].ExistsInQue != 1) {
856+
if (UpdateQue[i].ExistsInQue == 0) {
857+
int Index = RenderQue.IndexOf(UpdateQue[i]);
858+
RenderQue.RemoveAt(Index);
859+
RenderTransforms.RemoveAt(Index);
857860
UpdateQue[i].Reset(1);
858861
BuildQue.Add(UpdateQue[i]);
859862
}

0 commit comments

Comments
 (0)