Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

DK1 API issues

Discussion in 'AR/VR (XR) Discussion' started by virror, Dec 29, 2014.

  1. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Hey!
    I can use my DK1 just fine as long as i just drop in the camera prefab and all is working great. But as soon as i want to access something from the API like "OVRManager.display.isPresent" or "OVRManager.display.RecenterPose()" i have the problem that "OVRManager.display" always returns null, any idea why?
    Using latest SDK and runtime and are not using legacy DK1 mode.
     
  2. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Got this solved, OVRManager had not had its Awake() run yet, calling that function solved my issues : )
     
  3. drhmiri

    drhmiri

    Joined:
    Jun 17, 2014
    Posts:
    82
    *

    Hi virror,

    Is this the same problem as my using:

    Code (CSharp):
    1. if ( Ovr.Hmd.Detect() > 0 )
    2.             Debug.Log ( "Rift detected . ." );
    and getting results, but when using:

    Code (CSharp):
    1. if ( OVRManager.display.isPresent && OVRManager.tracker.isPresent )
    2.             Debug.Log ( "Both display and tracker are present!" );
    I get nothing?

    *
     
  4. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    No idea, i just used OVRManager.display.isPresent and it worked well for me.
     
    drhmiri likes this.
unityunity