Search code examples
c#unity-game-engineaugmented-realityarcore

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


I'm working on an AR project to keep track of AR things using Unity, AR Foundation and AR Core.

One of the tasks i need to do is the following:

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

I tried to implement the following way:

ARSubsytemManager.systemStateChanged += OnStateChanged;

but kept on getting the following error:

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

How can i do it?


Solution

  • Already manage to do it.

    As we can read in the documentation,

    The ARSubsystemManager has been removed in 2.0.

    Instead, I've used ARSession.stateChanged += OnStateChanged;