Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Prefabs Breaking Between Levels and Builds

jmorris142jmorris142 Posts: 83
edited July 2015 in Unity Development
This is a strange issue
Here is what is happening.

I have a Unity FPS controller, arms with weapon parented to it, then a game object at the end of the weapon that spawns my projectiles. All of this is guided by head position etc.

This is a prefab dropped in multiple levels.

It works perfectly most of the time through all levels.

When I build a version of the game with multiple levels, say 4 or 5. It will only work correctly on 1 of the levels, and that is also random, it could be any level that it chooses.

When it breaks head movement no longer guides the direction of the projectile spawner so you effectively can't aim anymore.
Really giving me a lot of trouble at the moment, I wonder if anyone has any ideas?.

using latest runtime and unity 5.1 with VR mode enabled, standard assets not OVR or anything.

I can send along 2 example builds that show the issue if that helps. Thanks so much.

EDIT - Just to be sure I just got the latest unity patch 5.1.1p4 and upgraded everything. Same issue.
EDIT2 - This also happens when switching weapons, if weapon 1 is initially working and I switch to a new weapon, things break, switch back to first weapon, now broken also. Posted this on unity forums just now as I suppose it might be more Unity related.

Here is a video of things working correctly, not that it helps, but you can see how it should behave. I'm using my eyeline / head movement to aim + jump etc. works well.


  • moltonmolton Posts: 388
    Hiro Protagonist
    First of all, nice looking game so far. :) I'm pretty sure Oculus recommends if you are using Unity 5, not to be using the Oculus Player Controller prefab but a standard Unity prefab with VR mode enabled, I don't think the Oculus prefabs are officially supported in Unity 5, only Unity 4.

    What method are you using to direct the aiming?
Sign In or Register to comment.