poi’s tech blog

3D多人数同時接続型球体アクション成人向けゲーム開発のためのアイデア、ナレッジ

VRTK 3.3.0 + Oculus Quest (スタンドアロン Android APP)構成メモ

VRTK v4はまだベータなので安定版の3.3.0でOculus Quest (Android APP)を使おうとしたらアセットのバージョン周りでかなりハマったのでメモ

v4はこの記事の通りで行けた。 qiita.com

バージョン情報

  • Unity 2018.4.3以上(Oculus Integrationのサポート都合上)
  • VRTK 3.3.0
  • Oculus Integration 14.0(最新版だとVRTK 3.3.0でエラーが出る都合上)

設定方法

VRTK 3.3.0をGithubのReleaseからダウンロードする

github.com

VRTK-3.3.0\Assets\VRTKディレクトリをUnity EditorにドラッグアンドドロップでProjectに追加

Oculus Integration 14.0を以下ページからダウンロードする

developer.oculus.com

現時点でAsset Storeから入手出来る最新Verは20.0だが、 インポートするとVRTKから以下のようなエラーが大量に出るため14.0を使用する。

error CS0117: 'OVRInput.Controller' does not contain a definition for 'RTrackedRemote'

ダウンロードしたOculusIntegration_14.0.unitypackageをダブルクリックしてインポートする。

インポート後、以下のエラーが1つ出てくる。

SDK_OculusController.cs(692,32): error CS1061: 'OvrAvatar' does not contain a definition for 'AssetsDoneLoading' and no accessible extension method 'AssetsDoneLoading' accepting a first argument of type 'OvrAvatar' could be found (are you missing a using directive or an assembly reference?)

以下のIssueの通り、OvrAvater.csの179行目を書き換える

github.com

#if AVATAR_INTERNAL
public AvatarControllerBlend BlendController;
#endif
public UnityEvent AssetsDoneLoading = new UnityEvent();

あとは以下の動画通りに設定していけばOK

www.youtube.com


余談

この構成にSteamVRアセットを追加して、開発はOculus Link + Steam VRで即座に行い、 最後にスタンドアロン Android APPとしてビルドするととても効率が良い。