#vr profiling
1 messages · Page 1 of 1 (latest)
making a thread
You'll want to switch from "Timeline" to "Hierarchy" in the bottom left corner.
the hierarchy is, by default, sorted by % of total frame time
so if you keep unfolding the first thing you can, you'll be looking at the most expensive functions
in my game here, the most expensive thing is waiting for the GPU to render the scene, for example
Select a lag spike, unfold the first few things, and show me the result
My unity crashed, and now reopened and its good now, but its without 4 new models, so they were the problem, is there a way to reduce their quality to stop the lag?
whoops
well, first check that this was really the case
put 'em back in and see if the game grinds to a halt
kk
Yeah it does...
Okay. Run the game for a few seconds, then pause and go look in the profiler.
Select one of the big spikes and unfold the hierarchy like I did above
does every spike happen while FixedUpdate is also present in the hierarchy?
80% of the time
hm, that's odd
one thing to try -- close the profiler and maximize the game view (double click on the tab)
WaitToBeginFrame should show up when your framerate is higher than the headset can display, meaning unity is waiting until the next frame should start. But that doesn't seem to be the case here.
What will that change
The inspector can cause large lag spikes (it's a very complicated bit of UI)
also, if you have the scene view open, that can slow it down quite a bit
I also found https://issuetracker.unity3d.com/issues/editor-performance-drops-as-oculusruntime-dot-waittobeginframe-time-ms-increases-to-150-200-ms-in-play-mode-when-msaa-is-enabled-and-scene-view-is-opened-slash-focused, but I'm not sure that's relevant here
i think that's just constant terrible framerate, not this spiky behavior
Btw i should have probably mentioned that before, the game is only laggy on vr not on pc
I was curious about this because that could mean you have really expensive mesh colliders on the objects
But the runtime is clearly taken up by WaitToBeginFrame; FixedUpdate is just a few ms