Unity 2020 build for Hololens:WorldManager.state is Unavailable

Hello,
When I use unity2020 build for Hololens, the WorldManager.state is always “Unavailable”. I have set the XR Plug-in Management like this:
6412149--716223--upload_2020-10-13_15-14-33.png

And it works well on Unity2019.3. The state is Active, then I can start my process.
I alse notice this:

Dose this means the “state” is unuseful? So how can I get the Hololens world state?

WorldManager is part of the Legacy VR API that was deprecated in 2019.3 and removed in 2020. What is it you need from the world state specifically?

My Process is

  1. start app
  2. check state
  3. if state is active, then set anchor position, and the next action; if state is unavailable, stop and return;

So I need to known current world state. Is there anything replace “World.state”?

In General SessionSubsystem.trackingState is what you want : Class XRSessionSubsystem | AR Subsystems | 2.2.0-preview.6
Enum TrackingState | AR Subsystems | 2.2.0-preview.6

For a Windows MR platform specific API only (which matches the old WorldManager.state) you can use the XRInputSubsystem extension method
WindowsMRInput.GetSpatialLocatability: Class WindowsMRInput | Windows XR Plugin | 2.4.1

1 Like