Skip to content

Commit

Permalink
performance thing that froox does all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
art0007i authored May 3, 2024
1 parent 2ea3ad0 commit 82e6bcf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ protected override Slot Compute(ExecutionContext context)
if (user == null) return null;

Slot slot = user.Root.Slot;
List<AvatarRoot> list = new List<AvatarRoot>();
List<AvatarRoot> list = Pool.BorrowList<AvatarRoot>();
slot.GetFirstDirectComponentsInChildren(list);
if (list.Count == 0) return null;
Slot avatarRoot = list.FirstOrDefault()?.Slot;
Pool.Return(ref list);

return list[0].Slot;
return avatarRoot;
}
}
}
}

0 comments on commit 82e6bcf

Please sign in to comment.