Unityが提供しているUniversalRenderPipelineをSpectatorViewで利用する方法を紹介
SpectatorView
- 概要の説明 : MixedReality-SpectatorViewの導入(QRコード編)beta
- Unity 2019.4での利用方法 : SpactatorViewをUnity2019.4での利用+iOSでPeople Occlusion
UniversalRenderPipeline(URP)
SpectatorViewプロジェクトのURP化
- Windows10
- Unity 2019.4.10f1
- VisualStudio2019
- HoloLens 2
- iPhoneXS
Unity Package Manager
- Unity Package ManagerからURPをインポートします.

URP設定
- プロジェクトの設定をURP用に設定します.
- プロジェクトにURP用のレンダリング設定ファイルを作成します.

- 作成したレンダリング設定ファイルはProjectSettingのGraphicsに配置します.

- そのままではiOS用のAR用のカメラが正常に動作しないため
UniversalRenderPipelineAsset_Renderer
のRenderer FeaturesにAR Background Renderer Feature
を追加します.

- また実行時にReplayKit周りで強制終了する場合があります.(原因確認中)
- メニューから
SpectatorView/Settings
を選択しInspectorのMobile Recording Settings
のEnable Mobile Recording Service
のチェックを外します.

URPに対応したサンプルプロジェクトがこちら
- URP用に設定を行ったサンプルプロジェクトになります.
- SpectatorViewはsubmoduleとして設定しているのでプロジェクトをダウンロード後
git submodule update --init --recursive
- SpectatorViewの設定 : SpactatorViewをUnity2019.4での利用+iOSでPeople Occlusion
akihiro0105/MixedReality-SpectatorViewURP
まとめ
- 設定次第で軽量化を行いつつ表現を追加することができる.
- 既存のShaderが利用できなくなるため場合によってはShaderを自作する必要がある.