cancel
Showing results for 
Search instead for 
Did you mean: 

5.1 p1 setup

bart42
Honored Guest
How do I setup Unity5.1 (with latest p1 patch) to develop for GearVR?

I've read about the Virtual Reality Supported setting, and the Stereoscopic Rendering (desktop only) but it's unclear to me.
I'm used to run and see the two camera's with barrel distortion(unity4.6) , but with this setup I don't see that. Do I need to add an OVR library?

I also tried installing the Unity Integration (from the SDK dir in VrSamples/Unity)

Thanks,
Bart
14 REPLIES 14

cybereality
Grand Champion
Did you see this post? viewtopic.php?f=37&t=24342
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

bart42
Honored Guest
Thanks, yes I did the Unity First Party config.
and I added the oculussig file in the Assets\Plugins\Android\assets folder.

I can build and install the apk file, but when putting in in the GearVR it crashes.

cybereality
Grand Champion
Are you on Note 4? Can you set storage to "internal only" or remove the SD Card?
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

bart42
Honored Guest
Yes Note4, I set Install Location : Force Internal and Write Access: Internal Only
After starting my test app it still crashes when put in GearVR (message:quit unexpectedly)

cybereality
Grand Champion
Mostly this can happen if the signature is missing or in the wrong folder or there is something wrong.

Can you go through that process again just to be safe?

https://developer.oculus.com/osig/
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

bart42
Honored Guest
Ok, created a new osig file, but it didn't help

I ran a adb logcat, started the testapp and found this, but I don't know what is all means but this line is interesting;
getReasonForCancelingVRActivity : The reason is hmt

V/ApplicationPolicy(  973): isApplicationStateBlocked userId 0 pkgname com.paint42.testapp
V/VRSVC ( 8642): at (HmtReceiver.java:31) onReceive() [onReceive action=com.samsung.android.intent.action.CANCEL_LAUNCHING]
D/VRSVC ( 8642): at (HmtReceiver.java:124) yTqX() [handleCancelLaunching=hmt developerMode=false setupWizardComplete=1]
V/VRSVC ( 8642): at (HmtReceiver.java:158) yTqX() [showInsertHMTPopup intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] fl
g=0x10200000 cmp=com.paint42.testapp/com.unity3d.player.UnityPlayerActivity } pendingIntent=PendingIntent{428dc2f8: android.os.BinderProxy@428dc298} newPendingI
ntent=PendingIntent{428df658: android.os.BinderProxy@42872e70}]
D/CustomFrequencyManagerService( 973): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 973 pkgName : ACTIVITY_RESUME_BOO
STER@6
W/ActivityManager( 973): mDVFSHelper.acquire()
D/ActivityManager( 973): getReasonForCancelingVRActivity : The reason is hmt
D/ActivityManager( 973): startActivity : cancel starting activity by hmt
V/ApplicationPolicy( 973): isApplicationStateBlocked userId 0 pkgname com.samsung.android.hmt.vrsvc
I/SurfaceFlinger( 330): id=116 createSurf (16x16),-1 flag=20004, EimLayer
I/SurfaceFlinger( 330): id=117 createSurf (16x16),-1 flag=20004, EimLayer
D/KeyguardUpdateMonitor( 1230): sendKeyguardVisibilityChanged(true)
I/KeyguardUpdateMonitor( 1230): visibility is same
D/Launcher.HomeView( 1448): onPause

bart42
Honored Guest
Updated info: I noticed that when I create a project in Unity, it doesn't create a manifest file.

cybereality
Grand Champion
Can you provide the full logcat file?

Also, you may just want to try with the latest mobile SDK and not using the first-party support.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

bart42
Honored Guest
Yes, it works now!

Things that I did to get in working

- removed Android 5.1.1 and installed Android 4.4 W.2 (API 20)
- copied the project settings ( \ovr_mobile_sdk_0.6.0.1\VrSamples\Unity\UnityIntegration\ProjectSettings )
- installed Unity integration ( \ovr_mobile_sdk_0.6.0.1\VrSamples\Unity\UnityIntegration )
- disabled Virtual Reality Supported in Player Settings , Android tab, Other Settings
- removed default camera
- dragged a OVRCameraRig to the scene ( Assets\OVR\Prefabs ) raised it a bit

Then build the APK and used adb install -r geartest.apk

Thanks Cybereality!