Multiple OnUpdate calls per frame

Abner Santos

New member
Hey Justin, while using the asset I came upon a weird behavior where one of my nodes was running 6 times per frame, so I created a sample project to investigate:

Screenshot 2026-02-12 at 17.34.37.png

While running this in a pure Entities workflow, I put a breakpoint in the Random Probability's OnUpdate method and, per unity frame, OnUpdate is getting called twice. Do you know what's happening? I've got other setups where it runs 4, 6, 9 times per frame; but this is the most basic example I could create.

Thank you in advance!
 
It seems easy at first but with the DOTS architecture it's actually pretty difficult to ensure a task only runs once per frame. I have been refining it throughout the version 2 lifecycle and it looks like you are hitting an edge case.

I have since refined it even more and just tested your use case.. Random Probability was only updated once per frame.
 
Back
Top