Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Unity WebXR ExporterでVR刺身タンポポを動かしてみた / Challeng...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
korinVR
April 27, 2020
Technology
17k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unity WebXR ExporterでVR刺身タンポポを動かしてみた / Challenge to use Unity WebXR Exporter for VR Sashimi Tanpopo
korinVR
April 27, 2020
Other Decks in Technology
See All in Technology
Geolonia の開発現場における AIの活用について
miya0001
0
100
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
1.4k
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
260
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
310
あるけみー式LTスライド作成術
alchemy1115
1
210
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
1.9k
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
820
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
200
LLMに渡さなかった仕事
nanaism
0
170
Omarchy Quattro の日本語設定周り
simosako
2
180
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
730
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
110
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.9k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
A designer walks into a library…
pauljervisheath
211
25k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Writing Fast Ruby
sferik
630
63k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
4 Signs Your Business is Dying
shpigford
187
23k
Transcript
Unity WebXR Exporterで VR刺身タンポポを動かしてみた こりん(@korinVR) WebXR Tech Tokyo #0 @
cluster 2020/04/27
自己紹介 本名 古林 克臣(こばやしかつおみ) ハンドル こりん(@korinVR) 職業 Unityエンジニア 所属 株式会社エクシヴィ
主な個人VR作品 - 3D駐車シミュレーター - VRちゃぶ台返し - パラレルパラソル(仮) - VR刺身タンポポ etc...
今日の題材 VR刺身タンポポ
VR刺身タンポポをQuestでリリースしたい 流れてくる刺身にタンポポをのせるだけの簡単なお仕事 イベントで展示したり、Windows実行ファイルを配布 本当はOculus Storeできちんと出したい ストアがゲーム機並みに厳しくこんなネタアプリは通らない WebXR!
WebXR版の実現方法 最初はA-FrameとA-Frame Physicsを使って ゼロから作り直すつもりだった……が 4月8日、MozillaのUnity WebXR Exporterが 突然のメジャーアップデート
WebXR版の実現方法 ブログエントリを読んだらQuestへの言及がある! ので、試しに使ってみることに
Unity WebXR Exporterについて UnityのWebGL出力をWebXR APIでVRに対応させる Asset StoreとGitHubにある。ドキュメントはGitHub参照
Unity WebXR Exporterの使い方(概略) 1. Universal Render Pipelineの新規プロジェクトを作成 2. Virtual Reality
Supportedをオン 3. プラットフォームをWebGLにする 4. Unity WebXR Exporterをインポート 5. InputManager.assetを入れ替え 6. Main Cameraを削除してWebXRCameraSetを配置 7. WebGL Templateをアセット付属の「WebXR」に設定 これでビルドすればオーケー!
注意:WebXR APIはHTTPSが必要 Build & Runで起動するローカルHTTPサーバーでは 正常に動作しない npmの http-server -S 等で動かす必要あり
(下記ページを参考に) node.js - npm http-server with SSL - Stack Overflow https://stackoverflow.com/questions/35127383/npm-http-server-with-ssl
ビルドしたアプリをウェブで公開するには HTTPSのウェブサイトを立ち上げる 今回はAWS Route 53でドメインを新規に取得し、 S3+CloudFront+Certificate Managerを使用 UnityでWebGL出力したフォルダをまるごと aws s3
sync コマンドでアップロード・更新 サイズが大きいのでバズる可能性があるなら転送料金に注意
Oculus Questでの動作画面
動作の所感
Oculus Questでの動作:起動時間 VR刺身タンポポの場合、WebGL出力のサイズは12MBほど ページを開いて起動に約20秒かかる おそらくほぼWebAssemblyのパース・コンパイル時間 将来的にはPCブラウザ同様 数秒で起動するようになるはず ロード画面を調整したほうがよさそう
Oculus Questでの動作:フレームレート フレームレートが低い(20~30fpsくらい?) Issueが立っていて、フォークされているバージョンでは 改善されているという話も。おそらく一時的な不具合
Chrome 81での動作 chrome://flags の下記設定でVRモードに入れる ……がヘッドセットの中に何も映らない(Rift SもViveも) (何か間違ってる気がする)
Firefoxでの動作 VRのパーミッションをRememberをチェックして 記憶させてからページをリロードする必要がある……。
現在のステータス: とりあえずQuestでは動く……! 何かcontributeしたいですね
Unity WebXR Exporterの注意点
注意1:WebXRCameraSetについている手 Takeモーションで指3本を曲げるだけの単純なもの WebXRCameraSet単体だと、トリガーの状態に関わらず Takeが再生されて指3本が曲がった状態で固定されてしまう →DesertControllerInteraction.cs を参考に解決 たぶん手は自前で 用意したほうがいい
注意2:コントローラーの角度 Unity上で実行したときと、ブラウザで実行したときで コントローラーの角度が大きく違う プラットフォームを判定してずらす必要がありそう
注意3:シーンロードしないこと SceneManager.LoadSceneでシーンを遷移・リロードすると VRモードが解除される=止まってしまう VR刺身タンポポではリスタート時にシーンリロードしていた LoadSceneせずに初期状態に戻るように書き直した 基本1シーンで作る必要がありそう
注意4:WebXRCameraSetの名前を変えない 動かなくなる。エディタで実行すると下記エラーが出る The webxr.js script requires the WebXRManager gameobject to
be named WebXRCameraSet for proper functioning UnityEngine.Debug:LogError(Object) WebXR.WebXRManager:Awake() (at Assets/WebXR/Scripts/WebXRManager.cs:110)
Oculus QuestでVR刺身タンポポ 試してみたい?
Questのブラウザを開いて、アドレスバーに バーチャルキーボード右下の「.com」キーを使うと楽です! 遊んでみてね! アプデしていきます! vrsashimi.com Oculus QuestでVR刺身タンポポ こりん(@korinVR)