Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. 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 at 1:11 AM.

  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:
    542
    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:
    542
    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:
    542
    try Screen.sleepTimeout = SleepTimeout.NeverSleep?