I’m trying to figure out how i can call a function when the user takes off the headset or put it back on (or in other words, the sleep and wake functions of the Vision Pro). I’ve tried the OnApplicationFocus(bool hasFocus) and OnApplicationPause(bool pauseStatus) from MonoBehaviour, as well as Volume Camera Events (Volume cameras | PolySpatial visionOS | 1.3.1) but nothing seems to work.
I’m in Mixed Reality Unbounded Mode using PolySpatial Version 1.3.1.
Update: I was able to get the Volume Camera Events but:
When starting the Application the Opened Event gets triggert (as it should)
When taking off the Focus false as wall as the Backgrounded Event (as expected)
After this no Events get called neither when putting back on nor tacking off.
I would appreciate any hint.
I need this funktionality because I send my Inputs from the PC to the Vision Pro over UDP, but after taking the headset off and back on the UDP connection stops working. I think i need to close and restart the UDP Listener on the headset side.
I have also noticed this behavior with the play to device feature, you then have to close and reopen the application.
We’re having a similar issue using Netcode. After you take off your device and put it back, if the app was connected to the server, all content disappears, the console says the AR state is Paused (or rather it never goes back to active) and Proxima is not connecting to the app. Seems like it never gets back from suspended mode.