当前上下文中不存在名称 'ARSubsystemManager'

The name 'ARSubsystemManager' does not exist in the current context

我正在从事一个 AR 项目,以使用 Unity、AR Foundation 和 AR Core 跟踪 AR 事物。

我需要完成的任务之一如下:

Write code to implement the 'systemStateChanged' callback from the ARSubsystemManager class.

我尝试通过以下方式实现:

ARSubsytemManager.systemStateChanged += OnStateChanged;

但不断出现以下错误:

The name 'ARSubsystemManager' does not exist in the current context

我该怎么做?

已经做到了。

我们可以在 the documentation

中读到

The ARSubsystemManager has been removed in 2.0.

相反,我使用了 ARSession.stateChanged += OnStateChanged;