Enable/Disable VR from code

后端 未结 3 1211
盖世英雄少女心
盖世英雄少女心 2020-11-27 07:29

How can I set the display to stereoscopic programmatically in Unity for an app deployed to an Android device?

I want a UI menu where the user can toggle between \"

3条回答
  •  星月不相逢
    2020-11-27 08:00

    For newer builds of Unity (e.g. 2019.4.0f1) you can use the XR Plugin Management package.

    To enable call:

    XRGeneralSettings.Instance.Manager.InitializeLoader();
    

    To disable call:

    XRGeneralSettings.Instance.Manager.DeinitializeLoader();
    

提交回复
热议问题