GooglePlayGames loses connection when changing scenes

Hi people. Me and my team are working in a college VR project, we’re pretty new in unity. We’re using GooglePlayGamesServices for the real-time multiplayer sync. We have a menu scene where we stablish connection between the players (only 2 for now), using CreateQuickGame(). If we try to broadcast a message, it works, as long as we stay in that scene. As soon as we change the scene, we get this log:

    11-04 01:13:50.872  3108  3130 W Unity   : Audio source is playing an ambisonic audio clip, but an ambisonic decoder could not be created successfully. Make sure an ambisonic decoder is selected in the audio settings.
    11-04 01:13:50.872  3108  3130 W Unity   :
    11-04 01:13:50.872  3108  3130 W Unity   : (Filename:  Line: 1111)
    11-04 01:13:50.872  3108  3130 W Unity   :
    11-04 01:13:51.423  3108  3130 I Unity   : Could not recreate VR window because GfxDevice is in an invalid state (device lost)
    11-04 01:13:51.423  3108  3130 I Unity   :
    11-04 01:13:51.423  3108  3130 I Unity   : (Filename:  Line: 901)
    11-04 01:13:51.423  3108  3130 I Unity   :
    11-04 01:13:51.487  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:13:51 -03:00 DEBUG: Application is pausing, which disconnects the RTMP  client.  Leaving room.
    11-04 01:13:51.487  3108  3130 I Unity   :
    11-04 01:13:51.487  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:13:51.487  3108  3130 I Unity   :
    11-04 01:13:51.488  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:13:51 -03:00 DEBUG: Entering state: LeavingRoom
    11-04 01:13:51.488  3108  3130 I Unity   :
    11-04 01:13:51.488  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:13:51.488  3108  3130 I Unity   :
    11-04 01:13:51.905  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:13:51 -03:00 DEBUG: Entering internal callback for InternalLeaveRoomCallback
    11-04 01:13:51.905  3108  3130 I Unity   :
    11-04 01:13:51.905  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:13:51.905  3108  3130 I Unity   :
    11-04 01:13:51.906  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:13:51 -03:00 DEBUG: Entering state: ShutdownState
    11-04 01:13:51.906  3108  3130 I Unity   :
    11-04 01:13:51.906  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:13:51.906  3108  3130 I Unity   :
    11-04 01:13:51.906  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:13:51 -03:00 DEBUG: ShutdownState.OnStateEntered: Defaulting to no-op.
    11-04 01:13:51.906  3108  3130 I Unity   :
    11-04 01:13:51.906  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:13:51.906  3108  3130 I Unity   :
    11-04 01:14:50.117  3108  3130 I Unity   : Enviando mensaje: msj-enviado-a-marian
    11-04 01:14:50.117  3108  3130 I Unity   :
    11-04 01:14:50.117  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    11-04 01:14:50.117  3108  3130 I Unity   :
    11-04 01:14:50.175  3108  3130 I Unity   :  [Play Games Plugin DLL] 11/04/17 1:14:50 -03:00 DEBUG: ShutdownState.SendToApp: Defaulting to no-op.
    11-04 01:14:50.175  3108  3130 I Unity   :
    11-04 01:14:50.175  3108  3130 I Unity   : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

And any message we try to send from the other scene won’t be received by anyone.

The script that executes the message functions is called MultiplayerManager. It extends from RealTimeMultiplayerListener, and it seems to be persisting through scenes because we don’t get a null pointer exception when we do MultiplayerManager.Instance.SendMessage(“Message”). However, any connection seems to be lost when changing scenes. Do I need to do something else to keep the connection across different scenes? Thanks in advance.

Bump.

I just noticed something weird. What’s breaking the connection is not the scene change, but the switch to VR mode. I ran some tests and the game works fine as long as I stay in or out of VR for the entire session. As soon as I do this:

IEnumerator LoadDevice(string newDevice)
        {
            VRSettings.LoadDeviceByName(newDevice);
            yield return null;
            VRSettings.enabled = true;
        }

The connection is lost. Even loading the device before and enabling VR after the connection breaks it. The only way to avoid this is to reconnect after enabling VR mode, but that won’t work for quick matches (as GooglePlayServices doesn’t let you reconnect to the same player). Is there any way to avoid losing the connection when switching to VR?