うさがにっき

読書感想文とプログラムのこと書いてきます

How to create cardboard VR with Unity 5.5

Overview



I heard a nice opinion. If you set the build version of androidmanifest to 24, there is a possibility that it will fail with runtimepermission. This is a problem also occurring in daydreamtechnicalpreview so it is more secure to use GVRSDK for unity 1.0.3.


I do not want to purposely download the DaydreamTechnicalPreview to make cardboardVR.
Summarize how to create CardboardVR with Unity 5.5.

諸事情から英語で書いていますが、動画見ればだいたいわかると思うのでやり方は動画みてください
経緯はこちら
github.com

Details

Environment

  • Unity5.5f3
  • Google VR SDK for Unity v1.10
  • Nexus5x(7.0.1)

Method

  • GoogleVR import
  • put GvrViewMain
  • Go Player Settings... on Android
  • Do not check virtual reality supported

f:id:tiro105:20170106134951p:plain

  • Fix GvrVideoPlayerTexture.cs (I'm not sure how to correct it correctly)
  private IEnumerator CallPluginAtEndOfFrames() {
    if (processingRunning) {
      Debug.LogError("CallPluginAtEndOfFrames invoked while already running.");
      Debug.LogError(StackTraceUtility.ExtractStackTrace());
      yield return new WaitForEndOfFrame();
    }
  • Fix Androidmanifest BuildVersion to 24
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />

youtu.be