cancel
Showing results for 
Search instead for 
Did you mean: 

Unity 5.6.1 - Gear VR: Choppy movements in an almost empty scene

Metal_Multiball
Heroic Explorer
Problem:  Unity 5.6.1 - Gear VR:  Choppy movements in an almost empty scene.  Samsung Galaxy 8+

If I create a new Unity project and add a simple moving sphere or a default particle emitter and publish to Gear VR, the resulting movement is choppy regardless of frame rate.
Has anyone else experienced this problem.

I will provide details if this is not already a known issue, as I have performed lots of troubleshooting tests already.
I'm hoping the solution is something simple like turning on a setting.  I have setup my project as per the Oculus and Unity documentation.
What I would love is a bare bones, empty, pre-made unity project with all the correct settings for Gear VR set, TimeManager settings, etc.

Thanks,
Steve
47 REPLIES 47

Metal_Multiball
Heroic Explorer
@JianZ

Yes,
The project you have reproduces this behavior every time.

Answers to your questions:

- When will this happen? - Repro steps on phone:  Close all apps, launch game on phone, insert phone to Gear VR headset, play game (good framerate), press back button and return to game, slow and choppy framerate forever, until game is shut down and restarted.  This reproduces every time.

- menu stage?  - This game has no menu stage, this behavior reproduces any time in the game.
- Unity version 2017.1
- Samsung Galaxy S8+

Note: I am using the OVRPlatformMenu script provided in the Oculus Utilities to enable the Gear VR back button.

I am in San Francisco and can bring the Samsung S8+ to you for testing.


Thanks,
Steve

JianZ
Expert Protege
@stevehinan  thank you, I'll test

appl044
Explorer
Sounds like memory or proceses are not released properly with the exit.  Maybe check your exit process. Also, this might confirm if processes are still running and allocated.  
http://www.easycodeway.com/2016/07/monitor-apps-ram-usage-in-android.html?m=1

Metal_Multiball
Heroic Explorer
Hi @appl044,

Thank you for your comment.  I have not created an exit process.  

My Gear VR back button implementation is as follows:
1 - OVRPlatformMenu script attached to an empty gameobject in Unity scene. (script provided by Oculus)
2 - Build & run game

Is custom code required to manage this memory?


Thanks,
Steve

appl044
Explorer
well, you should use this to quit.  
Application.Quit();
Note, Quit is ignored in the editor. 
https://docs.unity3d.com/ScriptReference/Application.Quit.html

You can also try and add 
public static AsyncOperation UnloadUnusedAssets();
if this still shows issues, but it should be cleared up without this. 
https://docs.unity3d.com/ScriptReference/Resources.UnloadUnusedAssets.html

I think the standard quit would be a short press, which you can attach to an event in the OVRManager 

palii90
Protege
Hi,

Has any progress been made on this issue? Because I have similar problem with my project.
My game running fine with 60 fps while (I press the back button) the confirm quit menu not show up, when I
go back (I select the cancel option) to the game it run much slower (35-40 fps).
The same thing happening when I put down the headset and wait while the device go to the idle mode, then
I put on it. The game return to the normal state, but it run with very poor performance.
Both cases VR.WaitForGPU spikes appears regularly in the Unity profiler.

I tried to reproduce this with a clean project and a really simple scene. I got the same
result, the performance drop wasn't too drastic in this case (but it was a very simple scene)
and similar VR.WaitForGPU spikes appeared again.

My test device: Galaxy S7 (SM-G930F) EU model, Android 7.0
Unity: 2017.1f3 and 2017.1p3

Thanks
Pali

JianZ
Expert Protege
@palii90
Thanks for the info,  we are still on this.   you  mentioned you have a very simple project which repro the issue, can you share the repro for us to testing?   "simple" is good for debugging, which reduced the variables we need track.

palii90
Protege
Yes, I can share the test project.
The Oculus confirm quit menu trigger the bug for me every time with this project.

sfaok
Protege
I have this exact issue (same phone - Galaxy S7 Exynos, Android 7.0). When you press back button and come back, performance is much worse. The same build on S6 is fine. Unity 5.6+

Metal_Multiball
Heroic Explorer
Just in case this is related, below are the Unity - Build warnings I get when building to Android - Samsung Galaxy S8+ (USA)



Assets/OculusPlatform/Scripts/Message.cs(13,26): warning CS0108: `Oculus.Platform.Message<T>.Callback' hides inherited member `Oculus.Platform.Message.Callback'. Use the new keyword if hiding was intended


Assets/OSPNative/scripts/ONSPAudioSource.cs(35,16): warning CS0414: The private field `ONSPAudioSource.readOnly_GlobalRelectionOn' is assigned but its value is never used


Assets/OSPNative/scripts/ONSPAudioSource.cs(36,16): warning CS0414: The private field `ONSPAudioSource.readOnly_NumberOfUsedSpatializedVoices' is assigned but its value is never used


Assets/VRStandardAssets/Scripts/VRDeviceManager.cs(11,40): warning CS0414: The private field `VRStandardAssets.Utils.VRDeviceManager.m_RenderScale' is assigned but its value is never used


Unknown cpu architecture for .so library (Assets/OculusPlatform/libovrplatformloader.so)
UnityEditor.HostView:OnGUI()


Missing Gear VR OSIG at Assets/Plugins/Android/assets. Please see https://dashboard.oculus.com/tools/osig-generator
UnityEngine.Debug:LogWarning(Object)
OVRMoonlightLoader:EnforceOSIG() (at Assets/OVR/Editor/OVRMoonlightLoader.cs:161)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()