Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
使用 XR 編輯器
在 2024 年,我們推出了 Godot XR 編輯器 ,這是一個 設計用於原生執行在 XR 裝置上 的 Godot 編輯器版本,實現了在裝置上直接建立、開發與匯出 2D、3D 和 XR 應用程式與遊戲。
The app can be downloaded from the Google Play Store, Meta Horizon Store, or from the Godot download page.
備註
XR 編輯器處於搶先體驗階段,同時我們持續改進使用者體驗。請參閱下方的 Xbox One 的限制。
XR 裝置支援
For now, the Godot XR editor is only available for Android XR devices, and the following Meta Quest devices running Meta Horizon OS v69 or higher:
Meta Quest 2
Meta Quest 3
Meta Quest 3s
Meta Quest Pro
備註
我們正在努力新增對更多 XR 裝置的支援,包括 PCVR 裝置。
執行時期權限
所有檔案存取權限 : 讓編輯器能夠建立、匯入及讀取裝置上任何檔案位置的專案檔案。沒有這個權限,編輯器仍然可以運作,但對裝置的檔案和目錄存取權限受到限制。
REQUEST_INSTALL_PACKAGES : 啟用編輯器能夠安裝匯出的專案 APK。
RECORD_AUDIO: 在啟用 audio/driver/enable_input 專案設定時請求。
USE_SCENE (META ONLY): Required to enable and access the scene APIs when running an XR project.
技巧與訣竅
輸入
為了獲得最佳體驗和高生產力,建議連接藍牙鍵盤與滑鼠以便與 XR 編輯器互動。XR 編輯器支援所有`常見捷徑與按鍵對應<https://docs.godotengine.org/en/stable/tutorials/editor/default_key_mapping.html>`__ 。
當與追蹤式控制器或追蹤式手部互動時,您可以開啟 interface/touchscreen/enable_long_press_as_right_click 編輯器設定,以啟用長按作為右鍵點擊。
當與追蹤控制器或追蹤手部互動時,您可以使用 interface/touchscreen/increase_scrollbar_touch_area 編輯器設定來增加捲軸的大小。
Multi-tasking on Quest
劇院視圖 可用於全螢幕顯示 編輯器視窗。
啟用 無縫多工處理 ,可在 Quest 的 實驗性設定 中找到,以啟用在執行中的 XR 專案與 編輯器視窗 之間快速切換的功能。
開發非 XR 專案時,當遊玩視窗處於啟用狀態時,Godot 編輯器應用程式圖示將可以讓您使用 Quest 的 應用程式選單 功能,在 編輯器視窗 與 遊玩視窗 之間切換。
當開發並執行 XR 專案時,您可以透過以下方式叫回 編輯器視窗:
按下 Meta 按鈕以叫出選單列
點擊 Godot 編輯器應用程式圖示以叫出 應用程式選單,並選擇 編輯器視窗 方塊。
專案同步
可透過下載 Android Git 客戶端來同步專案。我們推薦 Termux 終端機,這是一款 Android 終端機模擬器,能提供 Git 及 SSH 等常用終端工具的存取。
注意: 若要在 Termux 終端機使用 Git,必須為終端機授予 寫入 權限。可在終端機內 執行以下指令:
termux-setup-storage
外掛程式
GDExtension 外掛程式如預期般運作,但需要外掛程式開發者提供原生 Android 二進位檔。
Xbox One 的限制
以下是 XR 編輯器的已知限制與問題:
|eol| 已停止支援。
尚未支援 MIDI 輸出。
Vulkan Forward+ 著色器雖然可用,但是由於存在嚴重的效能問題,所以不推薦使用。