I use the Unity 5.5.0p1 and GoogleVR Cardboard version 1.3.0 to develop a VR game on iOS/Android.
I want to make the setting and the back button disappear, I successfully remove it on iOS.
However, on Android, I don’t know how, can anyone share me your experience or information?
We made it work in Google VR Android version 1.18.4 (we used Unity Package Manager). Credit to my boss who found the solution
I created a fork with the necessary files included in case you have a hard time recompiling them. GitHub - cdr9042/gvr-unity-sdk: Google VR SDK for Unity
Open gvr.aar using WinRAR in Packages/Google VR Android/Plugins/Android/ (locate it by right click > Show in Explorer)
Decompile the file classes.jar located inside
Go to com/google/vr/cardboard in the decompiled folder. You’ll find the file UiLayer.java there.
Edit UiLayer.java:
Find and change these lines:
//change from this.isSettingsButtonEnabled = true;
this.isSettingsButtonEnabled = false;
public boolean getBackButtonEnabled() {
//change from return (this.backButtonListener != null);
return false;
}
Recompile the modified UiLayer.java to make a new .jar file. You can name them uilayer.jar
Copy gvr.aar to somewhere else
Open the copied gvr.aar with WinRAR
Open the classes.jar file in the WinRAR window
Go to com/google/vr/cardboard deletes all the UiLayer$*.class & UiLayer.class files
Now you have a new uilayer.jar and a modified gvr.aar files. Place them in Assets/Plugins/Android in your project.
Remove the old gvr.aar files in Packages/Google VR Android/Plugins/Android/. You’ll have to locate it in explorer to delete it