playMaker

Author Topic: [Gear VR] Raycast does not work after submitting the APK to Oculus  (Read 708 times)

Dreatern

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
*I have also posted it on Oculus dev forums.

So I have a scene where names (uGui text inside a canvas *world space*) appear on top of what you look at, it uses raycast from the camera center to know what you're looking at and based on it presents the name of what you are looking.

I'm using Unity 5.5.1 with Playmaker (1.8.3.f4), making this app for Gear VR (using a Galaxy S7 Edge).
Everything works perfect in the editor, it also works perfectly on Gear VR locally (Build and Installing the APK manually or with my phone plugged on PC using build and run to auto install without send to Oculus)
Everything works.

I'm not using Oculus utility, only the native unity sdk, camera, etc and everything works fine. (but also have tested with utilities)

I created an app on Oculus Developer Center.  I have uploaded the APK to the ALPHA Channel and everything was fine, no problem with androidmanifest nor keystore, i have the thing there and i can download it from Oculus Store to test.

The problem is..., 
after submitting the APK to the ALPHA Channel and running it from Oculus Store, the raycast does not seem to work, I look at things and the names don't appear.
To make sure it was not an application problem, I did several tests and manually installed it outside the Oculus Store using the APK and everything works, but when I send to the ALPHA Channel, it stops working.
Just to make it clear, I have also tested with Oculus Utilities for Unity 5 V1.11.0 using OVR cam rig, input module on event system..... same problem
I sent an invitation to my app on ALPHA Channel to a friend to test and it does not work for him either.  :(

What can I do?
Is there something on AndroidManifest.xml or some process on Oculus Store that modifies an APK and limits certain things?

Dreatern

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: [Gear VR] Raycast does not work after submitting the APK to Oculus
« Reply #1 on: February 18, 2017, 04:43:11 PM »
I found the problem

I was using 2 global variables to store the raycast hit (bool) and the gameobject to have quick access to what the camera reticle was pointing to and apply the needed actions (Show the object name).

For some reason the application completely ignores global variables after submitted to the Oculus Store but it works perfectly if I install the apk (without the custom AndroidManifest.xml and keystore) on my phone test test locally.

On Oculus Store the application is installed internally. 
This, among other things must be set on AndroidManifest.xml to be approved there Defined on android player settings "install location = force internal".
(android:installLocation="internalOnly")
So you don't have the app icon and access outside the Oculus Store.

I'm not sure if this changes the way global variables are accessed and because of that they are ignored when the application runs through the Oculus Store.

I have changed the FSMs and states that are using the global variables and now everything is using the get/set fsm variable to know about raycast hit and everything is working running from oculus store.

But unfortunately I can not use any global variables which is more practical and simple :(



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: [Gear VR] Raycast does not work after submitting the APK to Oculus
« Reply #2 on: April 13, 2017, 12:00:38 AM »
Hi,

 that's very odd, I don't see why globals would not work on on this platform. I'll report this, maybe there is something odd.

Are you sure our global variables Is et properly, maybe the logic to set these globals is not performed as expected when deployed.


 Bye,

 Jean