r/oculusdev • • Dec 15 '14

[Unity 5] Inconsistent frame rate in editor / build

In Unity 5 (every beta I've tried so far) I have an issue where the first time I hit Play in the editor, I'll have a low frame rate (somewhere around 60 - 70). If I stop and then press Play again, the frame rate will jump by 20+ frames per second. It remains at this rate every time I press Play after this for the remainder of the session.

If I close the editor and open it again, the cycle starts again. Low frame rate the first time I press play, high frame rate every time after.

The big problem is that this behaviour seemingly carries over into builds except that I can't 'stop and re-start' the game. I load it up and get the same low frame rate I have in the editor the first time I press play. There's seemingly no way to reach the higher frame rate.

I tried this with a normal camera and couldn't replicate the issue. It only seems to be present when using the Oculus prefab. It also seems to be consistent across multiple projects.

Given how high the fps requirements are for VR titles, it'd be great if this could get resolved. As it is I can't hit the basic 75fps with this bug (however in editor I've seen frame rates comfortably in the hundreds on some projects).

Anyone else having this issue?

6 Upvotes

5 comments sorted by

1

u/irascible Dec 16 '14

To figure out the problem, disable all your systems and content... ensure that you're getting high/consistent framerates, then enable systems/objects, until it goes to shit.

If you can't do that due to how you have things set up, then fix that.

case in point: someone posted in r/opengl earlier today, about not being able to achieve high framerates... turns out he had a texture load from disk... in his main loop. enabling/disabling systems in a methodical fashion can help you narrow things down.

1

u/JonDadley Dec 16 '14

I'll try this later when I have some time but the fact that it only manifests when using the Oculus prefab (and not when using the standard camera) and across multiple projects makes me think it's nothing to do with my setup.

1

u/irascible Dec 16 '14

Do you see the same behavior in oculus sample projects that are not your own?

2

u/[deleted] Dec 16 '14

This happens in Unity 4 with the current SDK to. Believe Oculus manager is the issue here.

1

u/Podden Dec 15 '14

I saw this on Darkfield builds but I wasn't sure if it's a Unity 5 problem and I did not research further into for now. But when you see this, too I will have a more detailed look on this issue. Maybe we find something worth a bug report :).