You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spatial-anchors/tutorials/tutorial-new-unity-hololens-app.md
+42-42Lines changed: 42 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,66 +19,66 @@ This tutorial will show you how to create a new HoloLens Unity app with Azure Sp
19
19
20
20
To complete this tutorial, make sure you have:
21
21
22
-
- A Windows machine with <ahref="https://www.visualstudio.com/downloads/"target="_blank">Visual Studio 2017+</a> installed with the **Universal Windows Platform development** workload and the **Windows 10 SDK (10.0.17763.0 or newer)** component, and <ahref="https://git-scm.com/download/win"target="_blank">Git for Windows</a>.
23
-
- The [C++/WinRT Visual Studio Extension (VSIX)](https://aka.ms/cppwinrt/vsix) for Visual Studio should be installed from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/).
24
-
- A HoloLens device with [developer mode](https://docs.microsoft.com/windows/mixed-reality/using-visual-studio) enabled. This article requires a HoloLens device with the [Windows 10 October 2018 Update](https://docs.microsoft.com/windows/mixed-reality/release-notes-october-2018) (also known as RS5). To update to the latest release on HoloLens, open the **Settings** app, go to **Update & Security**, then select the **Check for updates** button.
22
+
1. A Windows machine with <ahref="https://www.visualstudio.com/downloads/"target="_blank">Visual Studio 2017+</a> installed with the **Universal Windows Platform development** workload and the **Windows 10 SDK (10.0.17763.0 or newer)** component, and <ahref="https://git-scm.com/download/win"target="_blank">Git for Windows</a>.
23
+
2. The [C++/WinRT Visual Studio Extension (VSIX)](https://aka.ms/cppwinrt/vsix) for Visual Studio should be installed from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/).
24
+
3. A HoloLens device with [developer mode](https://docs.microsoft.com/windows/mixed-reality/using-visual-studio) enabled. This article requires a HoloLens device with the [Windows 10 October 2018 Update](https://docs.microsoft.com/windows/mixed-reality/release-notes-october-2018) (also known as RS5). To update to the latest release on HoloLens, open the **Settings** app, go to **Update & Security**, then select the **Check for updates** button.
25
25
26
26
## Getting started
27
27
28
28
We'll first set up our project and Unity scene:
29
-
- Start Unity.
30
-
- Select **New**.
31
-
- Ensure **3D** is selected.
32
-
- Name your project and enter a save **Location**.
33
-
- Click **Create project**.
34
-
- Save the empty default scene to a new file using: **File** > **Save As**.
35
-
- Name the new scene **Main** and press the **Save** button.
29
+
1. Start Unity.
30
+
2. Select **New**.
31
+
4. Ensure **3D** is selected.
32
+
5. Name your project and enter a save **Location**.
33
+
6. Click **Create project**.
34
+
7. Save the empty default scene to a new file using: **File** > **Save As**.
35
+
8. Name the new scene **Main** and press the **Save** button.
36
36
37
-
**Set up the Project Settings**
37
+
**set up the Project Settings**
38
38
39
39
We'll now set some Unity project settings that help us target the Windows Holographic SDK for development.
40
40
41
41
First, lets set quality settings for our application.
- In the column under the **Windows Store** logo, click on the arrow at the **Default** row and select **Very Low**. You'll know the setting is applied correctly when the box in the **Windows Store** column and **Very Low** row is green.
2. In the column under the **Windows Store** logo, click on the arrow at the **Default** row and select **Very Low**. You'll know the setting is applied correctly when the box in the **Windows Store** column and **Very Low** row is green.
44
44
45
45
We need to let Unity know that the app we are trying to export should create an immersive view instead of a 2D view. We create an immersive view by enabling Virtual Reality support on Unity targeting the Windows 10 SDK.
46
46
47
-
- Go to **Edit** > **Project Settings** > **Player**.
48
-
- In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
49
-
- Expand the **XR Settings** group.
50
-
- In the **Rendering** section, check the **Virtual Reality Supported** checkbox to add a new **Virtual Reality SDK's** list.
51
-
- Verify that **Windows Mixed Reality** appears in the list. If not, select the **+** button at the bottom of the list and choose **Windows Mixed Reality**.
47
+
1. Go to **Edit** > **Project Settings** > **Player**.
48
+
2. In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
49
+
3. Expand the **XR Settings** group.
50
+
4. In the **Rendering** section, check the **Virtual Reality Supported** checkbox to add a new **Virtual Reality SDK's** list.
51
+
5. Verify that **Windows Mixed Reality** appears in the list. If not, select the **+** button at the bottom of the list and choose **Windows Mixed Reality**.
52
52
53
53
> [!NOTE]
54
54
> If you do not see the Windows Store icon, double check to make sure you selected the Windows Store .NET Scripting Backend prior to installation. If not, you may need to reinstall Unity with the correct Windows installation.
55
55
56
-
**Verify .NET configuration**
57
-
- Go to **Edit** > **Project Settings** > **Player** (you may still have **Player** open from the previous step).
58
-
- In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
59
-
- In the **Other Settings** Configuration section, make sure that **Scripting Backend** is set to **.NET**.
60
-
61
-
**Set Capabilities**
62
-
- Go to **Edit** > **Project Settings** > **Player** (you may still have **Player** open from the previous step).
63
-
- In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
64
-
- In the **Publishing Settings** Configuration section, check **InternetClientServer** and **SpatialPerception**.
65
-
66
-
**Set up the main virtual camera**
67
-
- In the **Hierarchy Panel**, select **Main Camera**.
68
-
- In the **Inspector**, set its transform position to **0,0,0**.
69
-
- Find the **Clear Flags** property, and change the dropdown from **Skybox** to **Solid Color**.
70
-
- Click on the **Background** field to open a color picker.
71
-
- Set **R, G, B, and A** to **0**.
72
-
- Select **Add Component** and search for **Spatial Mapping Collider**.
73
-
74
-
**Create our script**
75
-
- In the **Project** pane, create a new folder, **Scripts**, under the **Assets** folder.
76
-
- Right click on the folder, then select **Create >**, **C# Script**. Title it **AzureSpatialAnchorsScript**.
77
-
- Go to **GameObject** -> **Create Empty**.
78
-
- Select it, and in the **Inspector** rename it from **GameObject** to **MixedRealityCloud**. Select **Add Component** and search for and add the **AzureSpatialAnchorsScript**.
56
+
**verify .NET configuration**
57
+
1. Go to **Edit** > **Project Settings** > **Player** (you may still have **Player** open from the previous step).
58
+
2. In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
59
+
3. In the **Other Settings** Configuration section, make sure that **Scripting Backend** is set to **.NET**.
60
+
61
+
**set capabilities**
62
+
1. Go to **Edit** > **Project Settings** > **Player** (you may still have **Player** open from the previous step).
63
+
2. In the **Inspector Panel** for **Player Settings**, select the **Windows Store** icon.
64
+
3. In the **Publishing Settings** Configuration section, check **InternetClientServer** and **SpatialPerception**.
65
+
66
+
**set up the main virtual camera**
67
+
1. In the **Hierarchy Panel**, select **Main Camera**.
68
+
2. In the **Inspector**, set its transform position to **0,0,0**.
69
+
3. Find the **Clear Flags** property, and change the dropdown from **Skybox** to **Solid Color**.
70
+
4. Click on the **Background** field to open a color picker.
71
+
5. Set **R, G, B, and A** to **0**.
72
+
6. Select **Add Component** and search for **Spatial Mapping Collider**.
73
+
74
+
**create our script**
75
+
1. In the **Project** pane, create a new folder, **Scripts**, under the **Assets** folder.
76
+
2. Right click on the folder, then select **Create >**, **C# Script**. Title it **AzureSpatialAnchorsScript**.
77
+
3. Go to **GameObject** -> **Create Empty**.
78
+
4. Select it, and in the **Inspector** rename it from **GameObject** to **MixedRealityCloud**. Select **Add Component** and search for and add the **AzureSpatialAnchorsScript**.
79
79
80
80
## Trying it out
81
-
To test out that everything is working, build your app in **Unity** and deploy it from **Visual Studio**. Follow Chapter 6 from the [**MR Basics 100: Getting started with Unity** course](https://docs.microsoft.com/en-us/windows/mixed-reality/holograms-100#chapter-6---build-and-deploy-to-device-from-visual-studio) to do so. You should see the Unity start screen, and then a clear display.
81
+
To test out that everything is working, build your app in **Unity** and deploy it from **Visual Studio**. Follow Chapter 6 from the [**MR Basics 100: Getting started with Unity** course](https://docs.microsoft.com/windows/mixed-reality/holograms-100#chapter-6---build-and-deploy-to-device-from-visual-studio) to do so. You should see the Unity start screen, and then a clear display.
82
82
83
83
## Place an object in the real world
84
84
Let's create & place an object using your app. Open the Visual Studio solution that we created when we [deployed our app](#trying-it-out).
0 commit comments