Search Unity

cannot use Canvas (UI) with SteamVR

Discussion in 'AR/VR (XR) Discussion' started by pippolo, May 19, 2020.

  1. pippolo

    pippolo

    Joined:
    Jul 18, 2017
    Posts:
    19
    Hello, it might be trivial but..I've made my nice UI with a canvas containing some toggles..everything was ok without VR..now I'm adding VR to the game, and it throws this warning:

    A Canvas named "Canvas" with a render mode of ScreenSpaceOverlay is being used while VR is also enabled. This Canvas will continue to incur a rendering cost, but will not be visible while in VR. Is this intentional?

    I understand the message, but I don't know how to fix it: where should I put my toggles? Is there a correct way to solve the issue (possibly without rewriting everything)?

    Thanks
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You should just change the render mode to from ScreenSpaceOverlay to World (and then position it wherever you want it in the world).
     
  3. pippolo

    pippolo

    Joined:
    Jul 18, 2017
    Posts:
    19
    ah I missed that..thanks :)
     
  4. mili01001

    mili01001

    Joined:
    Apr 27, 2023
    Posts:
    1
    我已经这样做了,但是UI还是不能正确显示。请问为什么?
     
  5. VRStudy

    VRStudy

    Joined:
    Oct 24, 2017
    Posts:
    10
    Hi,

    Attached are my settings.
    Set Canvas->Render Mode->World Space

    In the RectTransfom it's also important to set the scale otherwise it will still be huge.
    Scale->(0.001,0.001,1)

    This is a Google translation sorry if wrong.

    这是谷歌翻译,如有错误请见谅。

    你好,

    附件是我的设置。
    设置画布->渲染模式->世界空间

    在 RectTransfom 中,设置比例也很重要,否则它仍然会很大。
    比例->(0.001,0.001,1)
     

    Attached Files: