如何在 Unity 中为 AR Foundation 使用 PC 网络摄像头

How to use PC webcam for AR Foundation in Unity

我目前正在从事一个包含 AR 内容的项目,因此在开始之前我决定使用 ARFoundation。现在,当我的项目完成后,我必须对其进行测试,但不幸的是我的 phone 不支持 ARKit。所以我决定直接在 Unity 中测试它,使用它的播放模式,但是当我 运行 它时 "Game" 面板变黑,我什么也看不见。我认为这是因为网络摄像头没有打开。那么如何在 Unity 中打开我的网络摄像头以测试我的 ARFoundation 应用程序?

谢谢。

与网络摄像头无关。只是因为 ARFoundation 需要 ARCore (android) / ARKit (ios) 兼容设备。

Requirement Hardware

  1. ARKit compatible device that is also supported by ARCore.
  2. A USB cable to connect your device to your development machine.

Source: Quickstart for ARCore Extensions for iOS

使用 Unity 编辑器进行游戏测试的是 Vuforia。此外,它支持大多数现代设备。

Vuforia Engine provides a simulator mode in the Game view that you can activate by pressing the Play button. You can use this feature to evaluate and rapidly prototype your scene(s) without having to deploy to a device.

你看过EasyAR吗?我已经将它用于几个低预算项目,它非常适合作为免费产品使用。如果您对水印没问题,请使用 v3 表示无水印或 v4 (Sense)。您可以pay/subscribe在 v4 上无水印。