You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been rewriting the core of my game to be asynchronous with UniTask in an effort to remove random lags caused by big pieces of work on the main thread. The ability to switch out to the thread pool on a whim is very convenient as well, but for stuff that must run on main inserting strategic yields and such is a viable tactic (if indeed resulting in delayed gameplay effects, which is fine).
It would be very useful to me if there is (or would be) a way to detect the longest running task "segment" (between two awaits) on the main thread, and what function(s) were running. I'm aware of the UniTask Tracker but it only shows the complete time of the task, as far as I know.
If this description is vague, here is what I'm currently doing when optimizing the game: I measure the maximum time taken between two frames. I then through the Unity profiler need figure out exactly what frame caused this spike by manually searching the timeline. The Unity profiler is rather heavyweight however and it takes at least two minutes just to enable the deep profiling, do the profiled run, and (after analyzing the results) disable deep profiling again. This kind of dev time usage adds up.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've been rewriting the core of my game to be asynchronous with UniTask in an effort to remove random lags caused by big pieces of work on the main thread. The ability to switch out to the thread pool on a whim is very convenient as well, but for stuff that must run on main inserting strategic yields and such is a viable tactic (if indeed resulting in delayed gameplay effects, which is fine).
It would be very useful to me if there is (or would be) a way to detect the longest running task "segment" (between two awaits) on the main thread, and what function(s) were running. I'm aware of the UniTask Tracker but it only shows the complete time of the task, as far as I know.
If this description is vague, here is what I'm currently doing when optimizing the game: I measure the maximum time taken between two frames. I then through the Unity profiler need figure out exactly what frame caused this spike by manually searching the timeline. The Unity profiler is rather heavyweight however and it takes at least two minutes just to enable the deep profiling, do the profiled run, and (after analyzing the results) disable deep profiling again. This kind of dev time usage adds up.
Beta Was this translation helpful? Give feedback.
All reactions