使用 Windows Mixed Reality 模擬器Using the Windows Mixed Reality simulator

Windows Mixed Reality 模擬器可讓您在電腦上測試混合現實應用程式,而不需要 Windows Mixed Reality 的沉浸式耳機。The Windows Mixed Reality simulator allows you to test mixed reality apps on your PC without a Windows Mixed Reality immersive headset. 模擬器可用於 Windows 10 Creators Update。The simulator is available with the Windows 10 Creators Update. 模擬器類似于 HoloLens 模擬器,不過模擬器不會使用虛擬機器。The simulator is similar to the HoloLens Emulator, though the simulator doesn't use a virtual machine. 模擬應用程式會在您的 Windows 10 desktop 使用者會話中執行,就像是使用沉浸式耳機一樣。Simulated apps run in your Windows 10 desktop user session, just like they would if you were using an immersive headset. 在沉浸式耳機上,感應器所讀取的人類和環境輸入,則是使用鍵盤、滑鼠或 Xbox 控制器來模擬。The human and environmental inputs read by the sensors on an immersive headset are instead simulated using your keyboard, mouse, or Xbox controller. 應用程式不需要任何修改,就能在模擬器中執行,也不知道它們不是在沉浸式耳機上執行。Apps don't need any modification to run in the simulator, and don't know they aren't running on an immersive headset.

啟用 Windows Mixed Reality 模擬器Enabling the Windows Mixed Reality simulator

  1. 從設定 啟用開發人員模式-> 的更新和安全性-> 開發人員Enable Developer mode from Settings -> Update and Security -> For developers
  2. 從桌面啟動 混合實境入口Launch the Mixed Reality Portal from the desktop
  3. 如果這是您第一次啟動入口網站,您將需要經過安裝體驗If this is your first time launching the portal, you'll need to go through the setup experience
    1. 選取 [開始 使用]Select Get started
    2. 選取 [ 我同意 接受合約]Select I agree to accept the agreement
    3. 針對開發人員選取 [設定] 以模擬 (,) 在沒有實體裝置的情況下繼續進行安裝Select Set up for simulation (for developers) to continue through setup without a physical device
    4. 選取 [ 設定 ] 以確認您的選擇Select Set up to confirm your choice
  4. 選取混合實境入口左側的 [ 適用于開發人員 ] 按鈕Select the For developers button on the left side of the Mixed Reality Portal
  5. 將模擬切換開關變成 開啟Turn the Simulation toggle switch to On
    • 啟用模擬時,預設會安裝並啟用左側的模擬 6 DOF 控制器。Enabling simulation installs and enables the left simulated 6-DOF controller by default. 在 Windows 10 可能2019更新之前,安裝模擬的 6 DOF 控制器需要系統管理員許可權。Before the Windows 10 May 2019 update, installing a simulated 6-DOF controller requires administrator permissions. 接受 [使用者帳戶控制] 對話方塊(如果有的話)。Accept the User Account Control dialog if one appears.

您現在應該正在使用模擬執行!You should now be running with simulation!

如果您想要在 [設定] 中停用開發人員模式,請先在混合實境入口的 [開發人員] 區段中,將模擬切換開關切換為 [關閉]。If you want to disable Developer mode in Settings, you should first turn the Simulation toggle switch to Off in the For developers section of the Mixed Reality Portal.

將應用程式部署至混合現實模擬器Deploying apps to the Mixed Reality simulator

由於模擬器是在沒有虛擬機器的本機電腦上執行,因此您可以在進行偵錯工具時,將通用 Windows 應用程式部署至 本機電腦Since the simulator runs on your local PC without a Virtual Machine, you can deploy your Universal Windows apps to the Local Machine when debugging.

基本模擬器輸入Basic simulator input

控制模擬器類似于許多常見的3D 視頻遊戲和 HoloLens 模擬器Controlling the simulator is similar to many common 3D video games and the HoloLens emulator. 可用的輸入選項包括使用鍵盤、滑鼠或 Xbox 控制器。There are input options available using the keyboard, mouse, or Xbox controller.

您可以藉由將模擬使用者的動作帶到沉浸式耳機,來控制模擬器。You control the simulator by directing the actions of a simulated user wearing an immersive headset. 您的動作會移動模擬的使用者,並與在沉浸式耳機上回應的應用程式產生互動。Your actions move the simulated user and cause interactions with apps that respond as they would on an immersive headset.

  • 向前走、向後走、向左走和向右走 - 使用鍵盤上的 W、A、S 和 D 鍵或 Xbox 控制器上的左搖桿。Walk forward, back, left, and right - Use the W,A,S, and D keys on your keyboard, or the left stick on an Xbox controller.
  • 向上、向下、向下 、向右鍵選取並拖曳滑鼠、使用鍵盤上的方向鍵,或在 Xbox 控制器上使用右邊的箭號。Look up, down, left, and right - Select and drag the mouse, use the arrow keys on your keyboard, or the right stick on an Xbox controller.
  • 動作按鈕按下控制器 -以滑鼠右鍵按一下滑鼠,按鍵盤上的 enter 鍵,或使用 Xbox 控制器上的按鈕。Action button press on controller - Right-click the mouse, press the Enter key on your keyboard, or use the A button on an Xbox controller.
  • 首頁按鈕按下控制器 -按鍵盤上的 Windows 鍵或 F2 鍵,或按下 Xbox 控制器上的 B 按鈕。Home button press on controller - Press the Windows key or F2 key on your keyboard, or press the B button on an Xbox controller.
  • 用於滾動的控制器移動 -按住 ALT 鍵和滑鼠右鍵,然後將滑鼠向上/向下拖曳。Controller movement for scrolling - Hold the Alt key and the right mouse button, then drag the mouse up / down. 在 Xbox 控制器中,按住右邊的觸發程式和按鈕,然後向下和向下移動。In an Xbox controller, hold down the right trigger and A button and move the right stick up and down.

追蹤的控制器Tracked controllers

混合現實模擬器可以模擬最多兩個現成的追蹤移動控制器。The Mixed Reality simulator can simulate up to two hand-held tracked motion controllers. 使用混合實境入口中的切換開關來啟用它們。Enable them using the toggle switches in the Mixed Reality Portal. 每個模擬控制器都有:Each simulated controller has:

  • 空間中的位置和方向Position and orientation in space
  • 首頁按鈕Home button
  • 功能表按鈕Menu button
  • 底框按鈕Grip button
  • TouchpadTouchpad
  • 操縱杆Thumbstick
  • 電池音量Battery level

下一個開發檢查點Next Development Checkpoint

依循我們配置的 Unity 開發檢查點旅程,此時您會進入部署階段。If you're following the Unity development checkpoint journey we've laid out, you're in the midst of the deployment stage. 您可以從這裡繼續前往下一個 主題 ,或直接跳到新增 advanced services。From here, you can continue to the next topic or jump directly to adding advanced services.

另請參閱See also