Search Unity

What's different between 5.5.1 and 5.5.2 for VR Enabled?

Discussion in 'AR/VR (XR) Discussion' started by Selzier, Mar 24, 2017.

  1. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    In Unity 5.5.1 and prior, to determine 'center of screen' with Unity's VR mode enabled, we would check the eyeTextureWidth and height, something like this:
    centerOfScreen = new Vector2(VRSettings.eyeTextureWidth / 2, VRSettings.eyeTextureHeight / 2);

    This quit working in Unity 5.5.2, and now even with VR mode enabled I must obtain 'center of screen via Screen.width and Screen.height.
    centerOfScreen = new Vector2(Screen.width / 2, Screen.height / 2);

    What changed in 5.5.2?
    I look through the release notes and found this:
    Virtual Reality: Updated to Oculus runtime version 1.11.
    Virtual Reality: Fixed inconsistency in game view between Singlepass Stereo and Multi Pass when using Split Stereo Diplay. - (814290)
    Virtual Reality: Fixed incorrect culling in Split Stereo Display. - (830612)
    Virtual Reality: Fixed incorrect eye view in Split Stereo Display. - (832185)
    Virtual Reality: Fixed incorrect viewport bounds in Singlepass Stereo. - (832283)

    I think it's related to one of these?
     
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Ok, now in 5.6f3:
    centerOfScreen = new Vector2(Screen.width / 2, Screen.height / 2);

    Does NOT work with GearVR. However it did with 5.5.2.

    So... what's the proper way to determine center of screen with VR mode enabled in 5.6 and going forward?

    What's there a difference between 5.5.2 and 5.6?

    I have an asset that must know center of screen and now we have to check for multiple conditions, if VR mode is enabled, if Unity if Pre-5.5.2, if Unity IS version 5.5.2, and if Unity is 5.6f3 or later.

    I'm wondering if the changes from 5.5.2 will be added to 5.6 f4??