如何使用 Unity 为 Oculus Quest 2 设置快速开发工作流程(即插即用)
我该如何设置 Unity 和 Oculus,以便可以在 Unity 中点击“播放”并立即查看结果,而不是在 Oculus 上构建和运行游戏?
How would I go about setting up Unity and Oculus so I can hit Play in Unity and see the results immediately instead of building and running the game on Oculus?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,这些是 Essentials 为了为Oculus Quest 2提供Unity所需的需求。完成这些步骤后,如果需要,可以执行其他步骤以具有最快的工作流程。
Unity方面:
对于Oculus方面:
最终,在构建设置中的团结 - >运行设备从选项中选择连接的Oculus设备,然后单击“构建”&运行(确保您至少添加了一个场景来构建设置)。这将构建应用程序并将其推向您的Oculus(如果通过USB连接)。当您将耳机戴上时,您会看到应用程序负载。
就是这样。这是您需要为Oculus开发VR游戏所需的最低限度。但是,当然,如果我们留下它,那将是非常缓慢且乏味的开发VR应用程序,因为我们将必须自己编码基本的VR原则,并浪费时间来构建和将应用程序推到设备上,每次我们想更改和更改和测试一些东西。因此,我们将安装更多内容,以加快开发的速度。
对于开发方面来说,这几乎就是它。如果您想为Oculus构建,您只需要去构建设置,然后在运行设备选项中选择连接的Oculus Quest 2设备,然后单击“构建”和“构建和运行”。当然,用XR钻机保存场景,并将其添加到建立设置。
测试以与ASUS TUF笔记本电脑上的Unity 2020.3.25F1合作。
如果您遇到障碍,请随时在某些步骤上纠正我。希望拥有尽可能全面的指南。
First off, these are the essentials one needs in order to develop for Oculus Quest 2 with Unity. After completing these steps, you can, if you want, do the other ones to have the fastest possible workflow.
Unity side:
For the Oculus side:
Finaly, In Unity in Build Settings -> Run Device choose the connected Oculus device from the options and click Build & Run (make sure you have at least one scene added to Build Settings). This will build the application and push it to your Oculus (if connected via usb). When you put your headset on you will see the application load.
That's it. This is the bare minimum you need in order for you to develop VR games for Oculus. But of course if we leave it at that it's going to be really slow and tedious developing VR apps because we will have to code basic VR principles by ourselves and waste time on building and pushing the app to the device every time we want to change and test something. And so, we are going to install a few more things in order to speed up development.
That's pretty much it for the development side. If you wish to build for Oculus, you just have to go to Build Settings and in the Run Device option choose the connected Oculus Quest 2 device and click Build and Run. And of course save the scene with the XR Rig and add it to Build Settings.
Tested to work with Unity 2020.3.25f1 on ASUS TUF laptop.
Feel free to correct me on some of the steps if you hit an obstacle. Would love to have as comprehensive guide as possible.