guodan
October 13, 2020, 7:20am
1
Hello,
When I use unity2020 build for Hololens, the WorldManager.state is always “Unavailable”. I have set the XR Plug-in Management like this:
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?
joejo
October 13, 2020, 1:10pm
2
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?
guodan
October 14, 2020, 2:43am
3
My Process is
start app
check state
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”?
joejo
October 14, 2020, 3:16pm
4
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