Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Fred_Vicentin · Jun 02, 2015 at 07:43 PM · androidoculussamsung

Reload game scene when take away Gear VR

Where can I find the function that turn off the Gear VR display ?

When you put on or take away Gear VR it turn off or on the display, I need to check this function or bool and add a function that reload my game level when the user take off the oculus I done a search on all OVR codes but I dont found the class that do this, have someway to access when the player take away the Gear VR ? Or a bool or something like that

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by PrimacyUnity · Jul 08, 2015 at 03:36 PM

there is a method in OVRPlatformMenu called OnApplicationFocus...you may be able to call Application.LoadScene("your scene") within that to effectively reset the scene

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ereptor · Apr 19, 2016 at 02:09 PM 0
Share

Does this only work using the OVR package? When using Unity's default behavior for enabling VR, my application closes when the Gear VR is disconnected.

avatar image
4

Answer by tteneder · Jun 03, 2016 at 10:37 AM

By now there is a solution for Unity 5. You have to use the Oculus Utilities for Unity 5. There you'll have a bool property named:

 OVRPlugin.userPresent

You may have to make sure there's an instance of OVRManager present.

The mentioned OnApplicationPause does work, but only after about 10 seconds after you took the Gear VR off, which is too long for many cases.

get the Oculus Utilities for Unity 5 here: https://developer.oculus.com/downloads

Source of solution: https://forums.oculus.com/de/discussion/31869/samsung-gear-vr-sdk-questions-unity3d-5-0

hth, @justin_iSO

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by justin_iSO · May 09, 2016 at 04:44 PM

Did you find an answer to this?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by zerograssi · Oct 17, 2016 at 12:56 PM

I used this "hand made" solution to manage the standby: Every second check the device time (hour, minutis and seconds express in seconds) and compared the data with a previously saved time (using PlayerPref). if the current time exceeds the time saved for 15 seconds or more (my timeout) the viewer was in standby and i reload the scene. Otherwise i save the new time on the device.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity on Gear VR with Galaxy S6 2 Answers

VR (Camera Fov & GearVR) question ! 0 Answers

GearVR Recenters view when you take off and put on the headset 1 Answer

How to get smooth device camera in gearvr like passthrough option? 0 Answers

Touch stopped working, works in remote 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges