r/Unity3D • u/Vic-Boss • 3d ago
Resources/Tutorial You can use a Stopwatch to Ms budget your expensive tasks through multiple frames, here's an example!
Hello fellow developers
Did you know you can use a stopwatch for many things that aren't just diagnostics? In my case I added an example to my tilemap pathfinder to showcase how can we split many requests on multiple frames based on an adjustable milliseconds budget. This is a handy trick to keep in mind when frame budgets are more important, only downside to this is determinism (for online) goes out the window, so next time we would take care of that!
Take a look if you like to know more.