Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

UNet + GearVR

Discussion in 'Connected Games' started by Yapper, Aug 9, 2018.

  1. Yapper

    Yapper

    Joined:
    Jun 22, 2014
    Posts:
    2
    Hi Everyone,

    I'm working on a multiplayer VR game that uses GearVR. It runs on LAN, no matchmaking. It should keep the connection even if the headset is unmounted. The problem is that if I remove the headsets and leave them on the table for 5-10 minutes, they loose the connection. I tried the following:

    - turn "Run in background" on in the project settings
    - turn "Run in background" on in the Network Manager settings
    - set "Disconnect timeout" in the Network Manager settings to an extremely high value

    None of the above helps. Please let me know if you have any suggestion, or if the post fits better to the VR/XR topic. Thank you in advance.

    Jason
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    Let me guess, does android went to sleep mode during this time?
     
  3. Yapper

    Yapper

    Joined:
    Jun 22, 2014
    Posts:
    2
    It seems like, while the headset is unmounted, the screen goes black, I'm not sure what's happening in the background.
     
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    If screen goes black most probably device is going to sleep and therefore switch wifi off. AFAIK there is a callback which will notify you if device is gong to sleep (hence do not remember that name :( )
     
  5. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    try Screen.sleepTimeout = SleepTimeout.NeverSleep?