Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

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

Discussion in 'VR' started by habolog, Jun 6, 2019.

Thread Status:
Not open for further replies.
  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:
    558
    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.
     
Thread Status:
Not open for further replies.