# VRDance專案整合筆記 ## 專案設置Project Setting **XR Plug-in Management** - PC 端選擇 OpenXR(不是Oculus頭盔都先這樣設置) - Android 端選Oculus (因為支援的控制器裡面好像還不包括 Vive) **OpenXR開發** - [OpenXR相關依賴插件](https://blog.csdn.net/seek_yang/article/details/124245887) ![](https://hackmd.io/_uploads/Hy34UuwE2.png) ![](https://hackmd.io/_uploads/SkO_IdvVn.png) **Unity Recorder** - [Unity Recorder教學](https://www.cg.com.tw/UnityRecorder/) --- ## SteamVR 開發 套件管理器下載SteamVR Plugin(版本 2.7.3 (sdk 1.14.15))並匯入。在Unity 2020中,插件導入後將默認安裝OpenVR XR Plugin工具包 ![](https://hackmd.io/_uploads/r1o1_OwVn.png) Unity的一些默認設置並不適用於SteamVR,該窗口會提示你需要更改的設置以及它們需要被更改成什麼樣。根據提示點擊Accept All即可自動更改項目設置。 ![](https://hackmd.io/_uploads/HkPUOuD4n.png) --- [Unity SteamVR獲取手柄按鈕觸發事件](https://blog.csdn.net/weixin_43778515/article/details/92419421) ``` 1. Create a normal button 2. add a box collider component to it 3. scale the box collider to fit the button (depth needs be > 0). 4. add the interactable script component 5. add the UIElement script component 6. add functions to the UIElement event box. ``` https://www.jianshu.com/p/31e9541e7a17 節錄重點 Player Prefabs (Core/Prefabs): - hmdTransforms: Camera Component - feetPositionGuess: 根据VR设备的位置来猜测玩家脚的位置 - bodyDirectionGuess: 身体方向的,和上面的属性相同,取决于玩家的站姿