Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity 5.1 VR Getting Started

Discussion in 'AR/VR (XR) Discussion' started by thep3000, Jun 10, 2015.

  1. laenseloe

    laenseloe

    Joined:
    Mar 17, 2015
    Posts:
    4
    QQ截图20150806105604.jpg
    Excuse me, newbie game designer here from China, could anyone tell me how to solve this problem please?
     
  2. fabian1986

    fabian1986

    Joined:
    Jun 3, 2015
    Posts:
    33
    ni hao laen sole.

    You could see this link:



    Wo Xipanya rem.

    If you set up well your settings java and sdk android and import file your oculus pin in the folder.
    I can play in my computer and in my S6 EDGE + oculus GRVR
     
  3. laenseloe

    laenseloe

    Joined:
    Mar 17, 2015
    Posts:
    4
    Thanks! I'm not a mobile VR contents developer but I'm still gained something via this video.
    I had setup the wrong version of Oculus SDK, it didn't suit the latest utility. After I fixed this problem, everything went perfectly! Thank you!
     
    AbelSoul likes this.
  4. guru20

    guru20

    Joined:
    Jul 30, 2013
    Posts:
    238
    Question: Do we NEED to use the Oculus Utilities package?

    I ask because the native 3D/VR worked fine on DK1 build, but when trying to do a Gear VR build... not having any luck (build goes through, but attempting to open app gives black screen followed by Gear VR hub/settings menu)
     
  5. bleu

    bleu

    Joined:
    Apr 6, 2013
    Posts:
    38
    This happens because my bundle identifier matches the package of my Android class (because my plugin extends UnityPlayerActivity). But that is required for this type of Android plugin -- I'm intercepting OpenGL calls from the rendering thread and I believe this is the only way to do it.

    Is there any way around this issue? I can't VR builds because of this. Non-VR builds work fine.
     
    Last edited: Aug 7, 2015
  6. dttngan91

    dttngan91

    Joined:
    Nov 21, 2013
    Posts:
    77
    I have got crash when enable/disable Virtual Reality Support in Player Settings many times. If sometimes it didn't crash fortunately, it plays like this image on the desktop, Oculus Rift screen is totally black without display, even though demo scene in Oculus Config works fine.
    I run Unity 5.1.1 on Window 7 64 bit with Leap Motion VR SDK https://developer.leapmotion.com/downloads/unity
    I don't think hardware have a problem because here is my hardware system:
    -Intel Xeon CPUE5 3.2GHz (12CPU)
    -32GB RAM
    -NVIDIA Quadro K4000

    Is there anyone has clue on my issue?
     

    Attached Files:

    Last edited: Aug 7, 2015
  7. bleu

    bleu

    Joined:
    Apr 6, 2013
    Posts:
    38
    Seems like the bundle identifier problem doesn't occur with Oculus's Unity legacy 0.6.0.1 integration -- no CommandInvocationFailure related to dex format. Having said that, I think what I've mentioned is probably a bug with Unity native VR support.
     
  8. dttngan91

    dttngan91

    Joined:
    Nov 21, 2013
    Posts:
    77
    Yes, I think Leap Unity Assets is error with OVR integrate. I replace it by the OVR folder from Oculus Utilities package, it works fine then.
     
  9. HappySlice

    HappySlice

    Joined:
    Nov 3, 2014
    Posts:
    17

    I'm getting the same thing except as a debug log message in a blank project. What did you do to solve this?
     
  10. fabian1986

    fabian1986

    Joined:
    Jun 3, 2015
    Posts:
    33
    I think if you copy your project settings another time. This is repaired with ovr package
     
  11. KC1302

    KC1302

    Joined:
    Jan 11, 2014
    Posts:
    94
    Nevermind.
     
    Last edited: Aug 10, 2015
  12. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    261
    @bleu I can't reproduce this locally on 5.1. What version are you using? If you could submit a bug with a simple repro project we'll take a look.
     
  13. fabian1986

    fabian1986

    Joined:
    Jun 3, 2015
    Posts:
    33
    I have version 5.1 but only use unity for VR GEAR OCULUS with S6 edege
     
  14. fabian1986

    fabian1986

    Joined:
    Jun 3, 2015
    Posts:
    33
    Hi guru20,

    Sorry for my bas english today I understand the question you tell in the post about UDK.
    I think UDK haven't got OVR camera and only have main camera but I don't know If UDK can embebed player for Virtual reality.

    Could you try if UDK have this embebed?

    Because I look a video in unity to embebed a player for virtual reality
     
  15. raja1250

    raja1250

    Joined:
    Mar 6, 2014
    Posts:
    5
    Head tracking is not working in android mobile.even applying an external script also results same.
    but stereo camera rendering working.
     
  16. VISIONSBOX

    VISIONSBOX

    Joined:
    Nov 7, 2014
    Posts:
    14
    I'm using 5.1.2p3, but I can't find the option for it. How can this be achieved?
     
  17. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    26
    Use two cameras. In 5.1.2p3 the Camera has a setting "Target Eye" - set it to left / right. Now you can use the culling masks...
     
  18. V0odo0

    V0odo0

    Joined:
    Jan 8, 2012
    Posts:
    255
    Is there any option to disable headtracking of specific camera?
     
    noemis likes this.
  19. Budlog

    Budlog

    Joined:
    Jul 20, 2015
    Posts:
    2
    pls how to set oculus DK1 and unity 5.1.2 to work together ? I tried many tutorial but i have only black screen on DK1 when i am in unity editor. Head tracking work great. Question 2: it is posible in unity 5.1.2 to switch betwen VR mode and no VR mode (in player settings) via Script ? Thansk a lot
     
  20. drewnashty1937

    drewnashty1937

    Joined:
    Jun 29, 2015
    Posts:
    4
    For the Gear VR part of this "Unity 5.1 VR Getting Started" guide it would be especially useful for new users if there was clarification on where and how to place the Signature file into the appropriate folder without forcing the user to troubleshoot and search why it's not working and use the older guides. It didn't take me but a minute to figure out but others who haven't been developing Gear VR projects for a while might encounter a bit of frustration for something that is supposed to have "native support".

    When attempting to utilize 5.1's native VR support by following the steps for "Getting Started with Gear VR" as shown in the beginning of this thread, it does not specify where to place the signature file and that folder path is also not available by just checking "Virtual Reality Supported". It just vaguely mentions:

    "5. You must include an Oculus signature file in your project."

    Of course simply dropping the sig file into the project or even the first Assets directory does not work, it just loads into the Samsung Gear VR main GUI after running the installed apk and inserting the device into the headset. Now because I knew from prior versions of Unity that one has to drop the Sig file into the "Assets\Plugins\Android\assets" directory I was able to quickly resolve this but not before noticing that those folders were not created when you check "Virtual Reality Supported" as they are using the older methods by importing the Oculus Mobile SDK package.

    Including a script that automatically creates the correct folder path where one drops the Sig file into after checking "Virtual Reality Supported" or just making an easier process of where to put the Sig file would be intuitive and give your new users less headache via an easy fix.
     
    archonware_jbueza and noemis like this.
  21. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    26
    Like V0odo0 I would also be very interested in how to switch off the positional tracking using the Gear and the unity build "Virtual Reality Supported"-Button. In old Oculus integration package we had those settings or could edit the script... but now I feel like having no control/tweaking options... But I'm still glad, that we have now left/right eye settings since 5.1.2p3!

    Another import information would be: what is the assumed IPD on gear?
     
    Last edited: Aug 18, 2015
  22. HamFar

    HamFar

    Joined:
    Nov 16, 2014
    Posts:
    73
    Guys, Now that we do not have to deal with OVR prefabs, etc... how do we modify camera behaviors? For example, how do I get a simple and static menu in VR that the user can use button presses and muse clicks with the headset on? The VR camera seems to be the Main Camera of the scene. Is this correct?
     
  23. NuProphett

    NuProphett

    Joined:
    Nov 3, 2014
    Posts:
    2
    I am using 5.1.2f1 and working on a GearVR project. I am still seeing no change when I switch the the AA value in the quality settings. Is this an issue on GearVR? Do I need to do something in addition to changing the Quality settings?
     
  24. NuProphett

    NuProphett

    Joined:
    Nov 3, 2014
    Posts:
    2
    Never mind. Figured it out. User error. :)
     
  25. RonaldReagan

    RonaldReagan

    Joined:
    Nov 27, 2014
    Posts:
    1
    Hi I've updated from Unity 4 to 5.
    I have made some VR programs on 4.X.
    Some stuff is familiar but other I unsure of.
    Does VR just work off 1 camera now?
    When I try to use Oculus utility prefab, it crashes the program.
    So trying to make a simple program.
    Main camera, light, plane, cube.
    When built & running:
    - Direct mode view, runs on main monitor, but not spilt cameras for each eye.
    - when run on extended, the eye orientation doesn't seem right.

    notes:
    - The Oculus Configuration Utility Demo works.
    - Head tracking / rotation works. (in game or built program)
    - Virtual Reality Supported, checked
    - Running on Windows 7.

    Downloads:
    -Oculus SDK source, V0.6.0.1-beta
    -Oculus Runtime for Windows V0.6.0.1-beta
    -Oculus Utilities for Unity 5, V0.1.0-beta

    any help, cheers in advanced.
     
  26. HamFar

    HamFar

    Joined:
    Nov 16, 2014
    Posts:
    73
    I think in order to be able to use OVR prefabs, you should leave the Unity5 Virtual Reality Supported option unchecked.

    Also, I think you cannot get the goggle-view on your monitor anymore. Hopefully, I am wrong and someone will correct me, but I have not been able to get the Oculus goggle view on my monitor, which was great for taking screenshots, etc... showing people that this is what the person wearing the Rift sees!

    About the camera, see the main page, which I found very helpful, particularly the section Understanding the camera: http://docs.unity3d.com/Manual/VROverview.html

    It works off this one camera by default, and if you want to move the camera, you should add a parent game object to it and move that one. Don't modify this camera, because it is controlled by the Rift. If you want the camera itself to be anywhere, put it as a child somewhere, and then place the parent where you want. In other words, all you need is this regular camera, and Unity5 will take care of the rest. Make the camera a child of another game object, so the head tracking stuff will work. When you want to move the camera, move the parent game object instead.

    One other thing I have learned (which might not relate to your question, but I just wanna share it, in case you still have not come across it) is that Unity5 Virtual Reality Supported checkbox does not currently turn the mouse cursor into a World Space or even Stereoscopic cursor. Basically, the mouse cursor does not work in VR. You can add it yourself, but it is a little more complex than you would expect.

    But like I said, if I am mistaken in something, someone will correct me here...
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    1,958
    Even if there is a particular stable version of Unity that it makes sense to recommend in the first post on this thread, I wonder if it would make sense to put something in there to encourage people to try latest patch releases. I say this because I'm seeing all sorts of important-sounding VR fixes and improvements listed in the release notes for patch releases all the time these days.
     
  28. ConkerJak

    ConkerJak

    Joined:
    Jan 9, 2013
    Posts:
    4
    Hi I'm trying to build an exemple scene for Samsung Gear VR S6 on Unity 5.1.2

    When I check the VR Supported toogle and build for Android, the following two errors appear.
    Note that there is no error when this toogle isn't checked.

    In anyway my app just display a black screen with or without signature file.
    I'm completly lost with Samsung Gear VR integration, please help me.
     
    bytewav likes this.
  29. gterveen

    gterveen

    Joined:
    Dec 17, 2012
    Posts:
    22
    using Unity 5.1.1p3

    deferred rendering with shadows and 16 point lights but a low poly scene.

    performance is just fine for me, but I like to scale the world down without scaling the world down.
    I can make the camera a child of a transform I scale up, but I can only go to about 4:4:4 before the shadows start breaking. I would like to go to 50:50:50 though!

    Right now I work around the problem by scaling down the world.

    Is there a solution to this problem?
     
  30. neurostuff

    neurostuff

    Joined:
    Sep 8, 2015
    Posts:
    3
    I'm using a GeForce 980 TI with driver version 10.18.13.5582, Windows 10, Unity 5.1.3f1 personal edition, latest Oculus runtime that now is exclusively direct mode, without extended mode. I followed the Oculus doc's recommendations by setting to vr mode and running in "maximize on play" but I'm getting about 1fps.... yes, 1fps. It's very slowly tracking my head movement, its being displayed on the Oculus DK2 but something is obviously very wrong. One last thing I should mention, this scene couldn't be any simpler, its just a plane and sphere with a light.

    Any ideas?
     
  31. neurostuff

    neurostuff

    Joined:
    Sep 8, 2015
    Posts:
    3
    Ok, found the problem - I didn't remove the oculus display driver (apparently no longer used on the 0.7 oculus runtime) I removed that, rebooted and now its ultra smooth.
     
  32. neurostuff

    neurostuff

    Joined:
    Sep 8, 2015
    Posts:
    3
    Ok, something obviously more sinister going on. This doesn't seem to be a unity thing, I'm now even seeing it happen from the oculus configuration utility's demo, it's slow now too.
     
  33. Count Borgula

    Count Borgula

    Joined:
    Sep 22, 2015
    Posts:
    3
    I am trying to get a simple app on my Samsung S6 edge Gear VR setup. I am following this tutorial:
    .

    The problem now is that I have my signature file, but I don't know where to put it, the \Assets\Plugins\Android\assets didn't appear to exist by default, so I created these folder manually and placed the signature file there, but when I build and run on the Gear VR it still says the thing about the apk being signed. Anyone know how to do this? Thanks in advance.
     
  34. Count Borgula

    Count Borgula

    Joined:
    Sep 22, 2015
    Posts:
    3
    Hi there, I did what you said above by manually creating the required folders and placing the sig file there. However, the GearVR still complains that the apk is not signed. Any thoughts?
     
  35. Count Borgula

    Count Borgula

    Joined:
    Sep 22, 2015
    Posts:
    3
    The specific error message I get is "Thread priority security exception. Make sure the apk is signed". Anyone else had this problem, and if and how did you solve it?
     
  36. Aljosha_Graphine

    Aljosha_Graphine

    Joined:
    Sep 25, 2015
    Posts:
    2
    great, thanks!
     
  37. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    128
    Have you found a way to enable google-view on monitor?
     
  38. BadSeedProductions

    BadSeedProductions

    Joined:
    Dec 26, 2014
    Posts:
    119
    I had Unity 5.1.3p1 working (the only version I have yet to get to work with VR) and it just decided to quit. No reason, just dead. Every single one of my new VR apps crash when I try to test them in Unity, just like before. I don't know what happened, was working great for weeks, and all of the sudden, mid project, no more... I have been able to open VR apps so this is definitely a Unity issue. Trying another patch version, but there are no notes about VR improvements, so probably just SOL

    edit: I downloaded 5.2.1p1 and so far so good! Maybe I missed the note, or maybe the problem just required a reinstall.
     
    Last edited: Sep 30, 2015
  39. ankitgoel

    ankitgoel

    Joined:
    Jan 3, 2013
    Posts:
    9
    Hello,
    I am facing a rather strange issue, my app doesn't render in VR display, everything is setup properly, the game asks for VR device but then render in full screen only, any thoughts on the matter
    ?
     
  40. HamFar

    HamFar

    Joined:
    Nov 16, 2014
    Posts:
    73
    Try the following line of code and see if your HMD is actually detected:
    Code (CSharp):
    1. Debug.Log( "Oculus Rift present = " + VRDevice.isPresent );
     
  41. LuckyStreak

    LuckyStreak

    Joined:
    Apr 1, 2015
    Posts:
    9
    How did you get those folders? I only have an assets folder. Did you include the mobile sdk? I thought Unity now had native support for GearVR. Where do I put the signature file if I only have an assets folder now? Before I used to have those folders from importing the mobile sdk, but things have changed I think now, where we no longer need to import anything?
     
  42. HoMeBoYErik

    HoMeBoYErik

    Joined:
    Mar 12, 2014
    Posts:
    22
    Hi,
    I imported te OculusUtilities_Example_0_1_2 in Unity 5.2.1p2 but the Menu_sample doesn't work properly. The menu disappear and the crosshair doesn't activate anything.
    How is it supposed to work? I'm looking for an example on how to interact with buttons and menus just gazing at them.
    Thank you
     
    HamFar likes this.
  43. HamFar

    HamFar

    Joined:
    Nov 16, 2014
    Posts:
    73
    See if the following links help, particularly the first one:
    http://talesfromtherift.com/vr-gaze-input/
    http://ralphbarbagallo.com/2014/08/...ursors-for-world-space-canvases-in-unity-4-6/
    http://forum.unity3d.com/threads/oculus-rift-with-leap-motion-developer.349016/
     
  44. deflix73

    deflix73

    Joined:
    Aug 1, 2015
    Posts:
    4
    Hi

    I'm developing for GEARVR successfully with 4.x but want to move to 5.x
    However even with an empty project, sig file added and setup correctly I am unable to even build with 5.x

    Initially there were conflicts between manifests - now these have been fixed I am getting other errors:

    The problem is I don't know where to start because this is an empty project, using Unity 5.2.1.f1 and Oculus mobile integration 0.6.2.0. My Android and Java SDK are both fine and Unity 4.6.8 runs perfect on the same computer.

    Does anyone have a suggestion because im stuck
    Is 5.x worth persuing yet or is the general consensus for Mobile VR dev to stick with 4.x for now?


    Thanks

    Felix
     
    Last edited: Oct 8, 2015
  45. antony1316

    antony1316

    Joined:
    Jan 30, 2014
    Posts:
    4
    Hello there,

    I'm using Unity 5.2.1 and Oculus SDK 0.7.0 on Windows.
    Everything runs great in the Unity Editor. However, when I attempt to run a built .exe, I get the following error:

    OVRPlugin.dll caused an Access Violation (0xc0000005)
    in module OVRPlugin.dll at 0023:66004714.

    Here are the full logs: https://drive.google.com/open?id=0B1zrbnw9wW5FQk96ekJLV1ZzMGM

    Anyone else have this problem or have an idea on what may be going on?
    Any help is greatly appreciated.
     
    Last edited: Nov 3, 2015
  46. Ed-unity

    Ed-unity

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    274
    Try updating the 5.2.2 and see if you get the same issue. I don't remember any 5.2.1 versions where the standalone player was crashing, but if you see the same issue on 5.2.2p2, please file a bug report. Preferably use the patch release here: https://unity3d.com/unity/qa/patch-releases
     
    antony1316 likes this.
  47. antony1316

    antony1316

    Joined:
    Jan 30, 2014
    Posts:
    4
    Thanks everyone! I was able to find a solution after much tinkering and researching. It was as simple as upgrading Unity to 5.2.2f1 and re-building. #thatwaseasy #wastedmytime
     
  48. JohannesQ

    JohannesQ

    Joined:
    Oct 9, 2012
    Posts:
    9
    Since my upgrade to 5.3.0f1 native GearVR support is completely broken for me.

    I'm just creating an empty project, add my oculussig files, add a new scene with a cube, and build with VR support enabled. I get the popup on my Note 4, but when I put it into the GearVR it starts into a scene with no head tracking and full screen mono rendering without distortion (I can see this by releasing the device and peeking in from the side).

    Up until Beta 6 this worked fine - is this a known issue or am I missing something obvious???
     
    bytewav likes this.
  49. Ed-unity

    Ed-unity

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    274
  50. TripleSimon

    TripleSimon

    Joined:
    Jul 1, 2015
    Posts:
    1
    I'm using Unity 5.2.3f1 on Mac OSX with the latest version of the Oculus Runtime. I can build the demos for the Samsung Gear VR and they run as expected on the device. However, whenever I press Play in the editor, I get these errors:
    Failed to create Oculus HMD.
    Compositor failed to initialize.
    Bad config or LibOVR not found. VR disabled.

    Is VR still supported in Mac OS?
    The device is not detected by Oculus Configuration Utility neither. Am I missing a step or something?