wivan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Visual Studio 2022 Plugins to install Make sure to activate **Visual Studio 2022 Enterprise** with your Academic Software account and license key - Universal Windows Platform development: - IntelliCode - IntelliTrace - USB Device Connectivity - C++ (v143) Universal Windows Platform Tools - Game development with Unity # Configure Unity for Windows Mixed Reality We'll start by creating a new Unity project and configuring it for Windows Mixed Reality development. Unity offers some behaviors that are specific to mixed reality and can be modified through project settings. ## Create a new Unity project 1. Launch the **Unity Hub**. 2. In the *Projects* tab, click **New Project**. ![](https://i.imgur.com/12VtEHk.png) 3. Click the drop-down underneath New project and then select the **2020.3 Editor** version ![](https://i.imgur.com/KWTy5yy.png) 4. Ensure the chosen template is **3D Core**. 5. In the Project name box, enter a name for your project--for example, "**MRTK Tutorial**". 6. In the Location box, click the folder icon, and then navigate to the folder where you want to save your project and select it. You can also create a new folder. ![](https://i.imgur.com/1HB08wR.png) 7. Click **Create Project**. This opens your project in Unity. :::danger **Caution** When working on Windows, there is a MAX_PATH limit of 255 characters. Unity is affected by these limits and may fail to compile if any file path is longer than 255 characters. Therefore, we recommend that you store your Unity project as close to the root of the drive as possible. ::: ## Configure your project for Windows Mixed Reality ### Switch Build Platform To target Windows Mixed Reality, your Unity project must be set to export as a Universal Windows Platform app. By default, the build settings for the Universal Windows Platform target any device, including immersive headsets. However, you can select a specific device using the Target Device drop down. 1. In the menu bar, select **File > Build Settings**.... 2. In the Build Settings window, select **Universal Windows Platform**. 3. Make sure the following settings are active: - Target device: HoloLens - Architecture: ARM64 - Build Type: D3D Project - Target SDK Version: Latest Installed - Minimum Platform Version: 10.0.10240.0 - Visual Studio Version: Latest installed - Build and Run on: Local Machine - Build configuration: Release (there are known performance issues with Debug) - Click the **Switch Platform** button. Unity displays a progress bar while it switches platforms. - After the switch platform process is finished, close the Build Settings window. ### Mixed Reality Feature Tool To import the Mixed Reality Toolkit into your project we'll use the **Mixed Reality Feature Tool**, which allows developers to discover, update, and import feature packages. You can search packages by name or category, see their dependencies, and view proposed changes to your project's manifest file before importing. 1. Download the latest version of the Mixed Reality Feature Tool from https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/welcome-to-mr-feature-tool. 2. After the download finishes, unzip the file and save it to your desktop. :::info **Note** Before you can run the Mixed Reality Feature Tool, you must install the .NET 5.0 runtime. Though this version is no longer supported, it is the correct version for this exercise. ::: 3. In the unzipped folder, navigate to the executable file **MixedRealityFeatureTool.exe** and then use it to launch the Mixed Reality Feature Tool. ![](https://i.imgur.com/EGLF1XM.png) 4. In the Mixed Reality Feature Tool, select **Start**. ![](https://i.imgur.com/njOGtPG.png) 5. Select the Browse button (it's the "three-dot" button in the image below), then navigate to your project, and then open it. ![](https://i.imgur.com/X43pQ64.png) :::info **Note** The Project Path box in the Tool must contain some value, so it inserts a backslash ("_") by default. ::: 6. After you select a folder, the Tool checks to ensure that it's a valid Unity project folder. ![](https://i.imgur.com/otAgRvC.png) 7. Select **Discover Features**. :::info **Note** You may need to wait a few seconds while the Tool refreshes the packages from the feeds. ::: 8. On the Discover Features page, note that there is a list of six package groups. ![](https://i.imgur.com/gTr4Yb2.png) 9. Click the "+" button to the left of Mixed Reality Toolkit (0 of 10) and then select the latest version of Mixed Reality Toolkit Foundation. :::info **Note** The Mixed Reality Toolkit Foundation package is the only package that must be imported and configured in order to use MRTK with your project. This package includes the core components required to create a mixed reality application. ::: 10. Click the "+" button to the left of Platform Support (0 of 5) and then select the latest version of Mixed Reality OpenXR Plugin. ![](https://i.imgur.com/6WPJmU7.png) 11. After you've made your selection(s), click **Get Features**. 12. Select **Validate** to validate the packages you selected. You should see a dialog that says No validation issues were detected. When you do, click **OK**. 13. On the Import Features page, the left-side column, Features, displays the packages you just selected. The right-side column, Required dependencies, displays any dependencies. You can click the Details link for any of these items to learn more about them. 14. When you're ready to move on, select **Import**. On the Review and Approve page, you can review information about the packages. 15. Select **Approve**. 16. Return to the Unity Editor and click a blank area in the UI. You'll see a progress bar showing you that your packages are being imported. ## Configure the Unity project for MRTK 1. After Unity has imported the packages, a warning appears asking if you want to enable the backends by restarting the editor. Select **Yes**. ![](https://i.imgur.com/mPJII9l.png) 2. The MRTK Project Configurator should appear. If it doesn't, open it manually: on the menu bar, select **Mixed Reality > Toolkit > Utilities > Configure Project for MRTK** ![](https://i.imgur.com/huDYmPv.png) 3. Select Unity OpenXR Plugin to enable XR Plugin Management and add the Unity OpenXR Plugin to your project. ![](https://i.imgur.com/qzeG7Jj.png) 4. On the Welcome to MRTK! screen, select **Show XR Plug-In Management Settings**. ![](https://i.imgur.com/p8Qxfal.png) 5. The Project Settings window opens. Ensure that you're on the XR Plug-in Management page with the Universal Windows Platform settings (Windows logo tab) displayed. ![](https://i.imgur.com/5U14heU.png) 6. Ensure that Initialize XR on Startup is selected, and then, under Plugin Providers, click **Open XR**. ![](https://i.imgur.com/eEVnRZ2.png) 7. The OpenXR Plugin loads, and then two items appear underneath OpenXR. Select the first one, **Microsoft HoloLens feature group**. 8. Note that there's now a yellow warning triangle next to OpenXR. Hover your cursor over the triangle, then read the message in the popup, and then select the triangle. ![](https://i.imgur.com/ylP0hbg.png) 9. In the OpenXR Project Validation window, there are several issues listed. Select the **Fix All** button. ![](https://i.imgur.com/WOBqQfd.png) 10. One issue remains and tells you that you must add at least one interaction profile. To do so, click **Edit**. This takes you to the settings for the OpenXR plugin in the Project Settings window. ![](https://i.imgur.com/JoEdcqO.png) 11. Underneath Interaction Profiles, note the plus sign (+) button. ![](https://i.imgur.com/RkMNtFz.png) 12. Click the button three times, each time choosing a different profile: - **Eye Gaze Interaction Profile** - **Microsoft Hand Interaction Profile** - **Microsoft Motion Controller Profile** ![](https://i.imgur.com/bymPLvX.png) 13. If the Eye Gaze Interaction Profile, or any other profile, appears with a yellow triangle next to it, select the triangle, and then in the OpenXR Project Validation window, click the **Fix** button. When you're finished, close the OpenXR Project Validation window. ![](https://i.imgur.com/GXsBcsc.png) 14. In the Project Settings window under OpenXR Feature Groups, ensure that the following are selected: - **Microsoft HoloLens** - **Hand Tracking** - **Motion Controller Model** ![](https://i.imgur.com/xc1fGRX.png) 15. Click the **Depth Submission Mode** drop down and then select **Depth 16 Bit**. ![](https://i.imgur.com/wtuKbJW.png) :::success **Tip** Reducing the Depth Format to 16-bit is optional, but it may improve graphics performance in your project. To learn more, see Depth buffer sharing (HoloLens). ::: :::info **Note** The Render Mode setting, located just above Depth Submission Mode, is set by default to Single Pass Instanced. In mixed reality apps, the scene is rendered twice: once for each eye. The result is "stereoscopic vision." This doubles the amount of necessary computing, so it's important to select the most efficient rendering path in Unity to save on both CPU and GPU time. Single pass instanced rendering is the best choice here--we recommend that you enable it by default for every project. To learn more about this, see the Unity documentation. ::: 16. Close the Project Settings window. 17. In the MRTK Project Configurator window, select **Apply Settings**. ![](https://i.imgur.com/ZL4g9CV.png) 18. Select Next and then Apply. 19. Unity must restart in order for the configuration to take effect. When prompted, select **Apply** to restart the Unity editor. ## Configure project settings for OpenXR 1. After Unity restarts, in the menu bar, select **Edit > Project Settings....** 2. In the Project Settings window's left-side column, select **Player**. 3. Note that in the Player window, the Product Name is "MRTK Tutorial." This is taken from your project name and will be the name displayed in the HoloLens Start menu. ![](https://i.imgur.com/E86f95P.png) :::success **Tip** To make the app easier to locate during development, add an underscore in front of the name to sort it to the top of any list. ::: 4. Click the **Publishing Settings** drop down, and then in the Package name field, enter a suitable name--for example, MRTK-Tutorials-Getting-Started: ![](https://i.imgur.com/ImF8HQr.png) :::info **Note** The package name is the unique identifier for the app. If you want to avoid overwriting previously installed versions of the app with the same name, you should change this identifier before deploying the app. ::: 5. Close the Project Settings window. ## Create the scene and configure MRTK 1. In the menu bar, select File > New Scene. 2. In the New Scene window select Basic (Built-in) and then click Create. 3. In the menu bar, select Mixed Reality > Toolkit > Add to Scene and Configure.... The Mixed Reality Toolkit settings appear in the Inspector. ![](https://i.imgur.com/Qs6EmgS.png) 4. After MRTK is added to the scene and configured, two new objects are added to the Hierarchy window: - **MixedRealityToolkit** - **MixedRealityPlayspace** The MixedRealityToolkit object contains the Toolkit itself. The MixedRealityPlayspace object ensures that the headset/controllers and other required systems are managed correctly in the scene. The Main Camera object becomes a child to the MixedRealityPlayspace object. This allows the play space to manage the camera simultaneously with the SDKs. ![](https://i.imgur.com/rt1Uvuc.png) 5. In the Inspector, verify that the profile drop down displays - **DefaultMixedRealityToolkitConfigurationProfile** ![](https://i.imgur.com/1HUaG1w.png) :::info **Note** One of the main ways that you can configure MRTK is by selecting a profile made available through the Foundation package. Profiles configure the behavior of MRTK core components. When MRTK is added to the scene, "DefaultMixedRealityToolkitConfigurationProfile" is preselected. This profile is for general use--it isn't optimized for any particular use case. MRTK provides additional default profiles that cover most platforms and scenarios that MRTK supports. You may want to choose a profile that's optimized for the specific platform you're using. To learn more about configuration profiles, see the MRTK profile configuration guide. ::: 6. In the menu bar, select **File > Save As....** 7. Navigate to the **Assets > Scenes folder**, then name your project, and then save your project. # Interaction models The Mixed Reality Toolkit enables you to consume inputs from various input sources such as 6DoF (six degrees of freedom) controllers, articulated hands, or speech. To determine the best interaction model for your app, think about your users' goals and consider any environmental factors that might impact their experience. There are three primary interaction models that suit the majority of mixed reality experiences. Although you could combine parts of various interaction models into your app, think carefully before doing so. It creates the risk of competing user input, such as simultaneous hand rays and a head-gaze cursor, and this might overwhelm and confuse users. ## Hands and motion controllers model The hands and motion controllers model requires users to use one or two hands to interact with the holographic world. This model removes the boundary between the virtual and the physical. Some specific scenarios include: - Providing information workers 2D virtual screens with UI affordances to display and control the content - Providing Firstline Workers tutorials and guides for factory assembly lines - Developing professional tools for assisting and educating medical professionals - Using 3D virtual objects to decorate the real world or to create a second world - Creating location-based services and games using the natural world as a background There are three hands and motion controllers modalities: - Direct manipulation with hands - Point and commit with hands - Motion controllers ## Hands-free model As the name implies, the hands-free model enables users to interact with holographic content without using their hands. Instead, they can use voice input or "gaze and dwell." Some specific scenarios include: - Being guided through a task while the user's hands are busy - Referencing materials while the user's hands are busy - Hand fatigue - Gloves that can't be tracked - Carrying something in their hands - Social awkwardness to make large hand gestures - Tight spaces ## Gaze and commit It's best to use gaze and commit when interacting with holographic content that's out of reach. The user gazes at an object or UI element, and then clicks on it ("commits" to it) using a secondary input. Commit methods include voice commands, a button press, or a hand gesture. There are two types of gaze input (head- and eye-gaze) and they have different commit actions.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully