Unity 播放模式Unity Play Mode

處理 Unity 專案的快速方式是使用「播放模式」,這會在本機電腦上的 Unity 編輯器中執行您的應用程式。A fast way to work on your Unity project is to use "Play Mode", which runs your app locally in the Unity editor on your PC. Unity 使用全像的遠端處理功能,在實際 HoloLens 裝置上提供快速的預覽內容。Unity uses Holographic Remoting to provide a fast way to preview your content on a real HoloLens device. [播放] 模式也可以與連接至開發電腦的 Windows Mixed Reality 耳機一起使用。Play Mode can also be used with a Windows Mixed Reality headset attached to your development PC.

使用全像攝影遠端的 Unity 播放模式Unity Play Mode with Holographic Remoting

使用全像全像全像,在您的電腦上的 Unity 編輯器中執行應用程式時,您可以在 HoloLens 上體驗您的應用程式。With Holographic Remoting, you can experience your app on the HoloLens while it runs in the Unity editor on your PC. 「注視」、「手勢」、「聲音」和「空間對應」輸入會從 HoloLens 傳送到您的電腦。Gaze, gesture, voice, and spatial mapping input is sent from your HoloLens to your PC. 轉譯後的畫面會傳回給您的 HoloLens。Rendered frames are then sent back to your HoloLens. 這是快速偵測應用程式,而不需要建立及部署完整專案的絕佳方式。This is a great way to quickly debug your app without building and deploying a full project.

  1. 在 HoloLens 上,移至 Microsoft Store 並安裝全像 遠端播放機 應用程式。On your HoloLens, go to the Microsoft Store and install the Holographic Remoting Player app.
  2. 在您的 HoloLens 上,啟動全像 Remoting 的播放 程式應用程式。On your HoloLens, start the Holographic Remoting Player app.
  3. 在 Unity 中,移至 [ 視窗] 功能表,展開 [ XR ] 子功能表,然後選取 [全像] 模擬In Unity, go to the Window menu, expand the XR submenu, and select Holographic Emulation.
  4. 模擬模式 設定為 [ 遠端裝置]。Set Emulation Mode to Remote to Device.
  5. 針對 [ 遠端電腦],輸入 HOLOLENS 的 IP 位址。For Remote Machine, enter the IP address of your HoloLens.
  6. 選取 [連接]。Select Connect. 您應該會看到 [連線 狀態 ] 變更為 [ 已連接 ],並在 HoloLens 中看到畫面空白。You should see Connection Status change to Connected and see the screen go blank in the HoloLens.
  7. 選取 [ 播放 ] 按鈕以啟動播放模式,並在您的 HoloLens 上體驗應用程式。Select the Play button to start Play Mode and experience the app on your HoloLens.

全像遠端處理需要快速的電腦和 Wi-Fi 連接。Holographic Remoting requires a fast PC and Wi-Fi connection. 您可以在全像是「全像 遠端播放機 」檔中找到更多詳細資料。You can find more details in the Holographic Remoting Player documentation.

為了獲得最佳結果,請確定您的應用程式已正確設定 焦點點For best results, make sure your app properly sets the focus point. 這可協助全像攝影的遠端處理,以最適合您的場景來調整您的無線連線延遲。This helps Holographic Remoting to best adapt your scene to the latency of your wireless connection.

另請參閱See Also