Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

XRSettings.eyeTextureWidth/Height aren't intialized at Start()

Discussion in 'Windows Mixed Reality' started by habolog, Jun 6, 2019.

  1. habolog

    habolog

    Joined:
    May 17, 2017
    Posts:
    8
    Porting my project from SteamVR to WMR I've faced issue with determining of RenderTexture's size at time when 'Start' methods of my scripts are being invoked.

    Running on Vive/VivePro in Start method I can get rendering textures size via XRSettings.eyeTextureWidth/Height but on WMP headsets that data is available only in OnRenderImage of Camera component object or at some 3rd call of Update.

    My app requires rendering texture size's data at Start stage to properly gets ready some resources.
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    557
    Hello,

    Can you file a bug with a min repro project so we can try and investigate on our side? Could you share some more details on how your script runs?

    thank you,
    Wesley
     
  3. habolog

    habolog

    Joined:
    May 17, 2017
    Posts:
    8
    Hi!
    I've reported the bug: (Case 1160846) XRSettings.eyeTextureWidth and eyeTextureHeight are incorrect at Start() in Windows Mixed Reality

    Details are simple: WMR Headset HP Reverb
    Unity Editor: 2019.3.0a4
    Script is a component of MainCamera, implements MonoBehaviour methods Start, Update, OnRenderImage, etc.
    Player settings: Virtual Reality is enabled (Windows Mixed Reality SDK), Multi-Pass rendering.
    At bug report is attached sample project (SampleScene with MainCamera, one Canvas with sprite image).

    Actually I have one more serious bug with WMR, I'm going to report it today bit later.