Skip to content

Commit 022064a

Browse files
author
David Kline
authored
Merge pull request #6851 from microsoft/releases/2.2.0
Releases/2.2.0
2 parents 2c711ab + 25acfd3 commit 022064a

File tree

1,139 files changed

+348391
-17915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,139 files changed

+348391
-17915
lines changed

.github/write-good.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
writeGood: false
2+
alex: false
3+
spellchecker: true

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,10 @@ doc/
9191
/MSBuild/
9292
/PackagesCopy/
9393
!/scripts/Packaging/NuGetRestoreProject.csproj
94+
95+
# ========================= #
96+
# MSBuildForUnity generated #
97+
# ========================= #
98+
Assets/MixedRealityToolkit.Providers/WindowsMixedReality/DotNetAdapter/Plugins*
99+
MSBuildForUnity.Common.props
100+
.obj

Assets/MixedReality.Toolkit.Foundation.nuspec

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@
55
<version>$version$</version>
66
<authors>Microsoft</authors>
77
<owners>Microsoft,MixedReality</owners>
8-
<licenseUrl>https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/License.txt</licenseUrl>
9-
<projectUrl>https://github.com/Microsoft/MixedRealityToolkit-Unity</projectUrl>
8+
<licenseUrl>https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/releases/2.2.0/License.txt</licenseUrl>
9+
<projectUrl>https://aka.ms/MRTK</projectUrl>
10+
<iconUrl>https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Images/MRTK_Logo_NuGet.png</iconUrl>
1011
<requireLicenseAcceptance>true</requireLicenseAcceptance>
1112
<description>The Mixed Reality Toolkit is a collection of scripts and components intended to accelerate development of applications targeting Microsoft HoloLens and Windows Mixed Reality headsets.</description>
1213
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
1314
<releaseNotes>$releaseNotes$</releaseNotes>
14-
<tags>Unity MixedReality</tags>
15+
<tags>Unity MixedReality MixedRealityToolkit MRTK</tags>
16+
<dependencies>
17+
<dependency id="Microsoft.Windows.MixedReality.DotNetWinRT" version="0.5.1037" />
18+
</dependencies>
1519
<contentFiles>
1620
<files include="any\any\.PkgSrc\**" buildAction="None" copyToOutput="false" />
1721
</contentFiles>
1822
</metadata>
1923
<files>
2024
<file src="MixedRealityToolkit\**" exclude="*.nuspec;*.nuspec.meta;*.props;*.props.meta;*.targets;*.targets.meta;MixedRealityToolkit\toc.yml*" target="MRTK\" />
21-
<file src="MixedRealityToolkit.Providers\**" exclude="*.nuspec;*.nuspec.meta;*.props;*.props.meta;*.targets;*.targets.meta;MixedRealityToolkit.Providers\License.txt*;MixedRealityToolkit.Providers\Version.txt*" target="MRTK\" />
25+
<file src="MixedRealityToolkit.Providers\**" exclude="*.nuspec;*.nuspec.meta;*.props;*.props.meta;*.targets;*.targets.meta;MixedRealityToolkit.Providers\License.txt*;MixedRealityToolkit.Providers\Version.txt*;MixedRealityToolkit.Providers\WindowsMixedReality\DotNetAdapter*;MixedRealityToolkit.Providers\WindowsMixedReality\DotNetAdapter\**\*.*" target="MRTK\" />
2226
<file src="MixedRealityToolkit.SDK\**" exclude="*.nuspec;*.nuspec.meta;*.props;*.props.meta;*.targets;*.targets.meta;MixedRealityToolkit.SDK\License.txt*;MixedRealityToolkit.SDK\Version.txt*;MixedRealityToolkit.SDK\toc.yml*;MixedRealityToolkit.SDK\StandardAssets.meta;MixedRealityToolkit.SDK\StandardAssets\Fonts.meta;MixedRealityToolkit.SDK\StandardAssets\Materials.meta;MixedRealityToolkit.SDK\StandardAssets\Shaders.meta;MixedRealityToolkit.SDK\StandardAssets\Textures.meta" target="MRTK\" />
2327
<file src="MixedRealityToolkit.Services\**" exclude="*.nuspec;*.nuspec.meta;*.props;*.props.meta;*.targets;*.targets.meta;MixedRealityToolkit.Services\License.txt*;MixedRealityToolkit.Services\Version.txt*" target="MRTK\" />
2428

@@ -30,21 +34,21 @@
3034
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.dll*" target="Plugins\" />
3135
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.pdb*" target="Plugins\" />
3236
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.Gltf.*" target="Plugins\" />
33-
<!--Source commented as part of 2.1 release due to lack of support for long paths in N4U, and there is support for using source publicly yet.-->
34-
<!--<file src="..\..\Assets\MixedRealityToolkit\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit" />-->
37+
<!-- commenting source packaging for the 2.2.0 release -->
38+
<!-- <file src="..\..\Assets\MixedRealityToolkit\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit" /> -->
3539

3640
<!-- Assemblies and Sources that are built from the MixedRealityToolkit.Providers folder -->
3741
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.Providers.*" target="Plugins\" />
38-
<!--<file src="..\..\Assets\MixedRealityToolkit.Providers\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.Providers" />-->
42+
<!-- <file src="..\..\Assets\MixedRealityToolkit.Providers\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.Providers" /> -->
3943

4044
<!-- Assemblies and Sources that are built from the MixedRealityToolkit.SDK folder -->
4145
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.SDK.*" target="Plugins\" />
4246
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.SDK.Inspectors.*" target="Plugins\" />
43-
<!--<file src="..\..\Assets\MixedRealityToolkit.SDK\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.SDK" />-->
47+
<!-- <file src="..\..\Assets\MixedRealityToolkit.SDK\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.SDK" /> -->
4448

4549
<!-- Assemblies and Sources that are built from the MixedRealityToolkit.Services folder -->
4650
<file src="..\Plugins\**\Microsoft.MixedReality.Toolkit.Services.*" target="Plugins\" />
47-
<!--<file src="..\..\Assets\MixedRealityToolkit.Services\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.Services" />-->
51+
<!-- <file src="..\..\Assets\MixedRealityToolkit.Services\**\*.cs" target="contentFiles\any\any\.PkgSrc\MRTK\MixedRealityToolkit.Services" /> -->
4852

4953
<!--
5054
link.xml is copied to the root location, so that it can catch IL2CPP
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using System.Reflection;
5+
6+
[assembly: AssemblyVersion("2.2.0.0")]
7+
[assembly: AssemblyFileVersion("2.2.0.0")]
8+
9+
[assembly: AssemblyProduct("Microsoft® Mixed Reality Toolkit Examples")]
10+
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")]

Assets/MixedRealityToolkit.Examples/AssemblyInfo.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scenes/BoundaryVisualization.unity

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ MonoBehaviour:
256256
m_OnCullStateChanged:
257257
m_PersistentCalls:
258258
m_Calls: []
259-
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
260-
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
261259
m_FontData:
262260
m_Font: {fileID: 12800000, guid: e869342c56e54acf989b2422b4b80dcc, type: 3}
263261
m_FontSize: 40
@@ -540,8 +538,6 @@ MonoBehaviour:
540538
m_OnCullStateChanged:
541539
m_PersistentCalls:
542540
m_Calls: []
543-
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
544-
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
545541
m_FontData:
546542
m_Font: {fileID: 12800000, guid: e869342c56e54acf989b2422b4b80dcc, type: 3}
547543
m_FontSize: 40
@@ -698,8 +694,6 @@ MonoBehaviour:
698694
m_OnCullStateChanged:
699695
m_PersistentCalls:
700696
m_Calls: []
701-
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
702-
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
703697
m_FontData:
704698
m_Font: {fileID: 12800000, guid: e869342c56e54acf989b2422b4b80dcc, type: 3}
705699
m_FontSize: 40

Assets/MixedRealityToolkit.Examples/Demos/Boundary/Scripts/BoundaryVisualizationDemo.cs

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
using Microsoft.MixedReality.Toolkit.Boundary;
55
using System.Collections.Generic;
6-
using Microsoft.MixedReality.Toolkit.Utilities;
76
using UnityEngine;
8-
using UnityBoundary = UnityEngine.Experimental.XR.Boundary;
97

108
namespace Microsoft.MixedReality.Toolkit.Examples.Demos
119
{
@@ -32,20 +30,6 @@ public class BoundaryVisualizationDemo : MonoBehaviour, IMixedRealityBoundaryHan
3230
[SerializeField]
3331
private bool showBoundaryCeiling = true;
3432

35-
private IMixedRealityBoundarySystem boundarySystem = null;
36-
37-
private IMixedRealityBoundarySystem BoundarySystem
38-
{
39-
get
40-
{
41-
if (boundarySystem == null)
42-
{
43-
MixedRealityServiceRegistry.TryGetService<IMixedRealityBoundarySystem>(out boundarySystem);
44-
}
45-
return boundarySystem;
46-
}
47-
}
48-
4933
#region MonoBehaviour Implementation
5034

5135
private void Awake()
@@ -57,7 +41,7 @@ private void Awake()
5741

5842
private void Start()
5943
{
60-
if (BoundarySystem != null)
44+
if (CoreServices.BoundarySystem != null)
6145
{
6246
if (markers.Count == 0)
6347
{
@@ -68,24 +52,25 @@ private void Start()
6852

6953
private void Update()
7054
{
71-
if (BoundarySystem != null)
55+
if (CoreServices.BoundarySystem != null)
7256
{
73-
BoundarySystem.ShowFloor = showFloor;
74-
BoundarySystem.ShowPlayArea = showPlayArea;
75-
BoundarySystem.ShowTrackedArea = showTrackedArea;
76-
BoundarySystem.ShowBoundaryWalls = showBoundaryWalls;
77-
BoundarySystem.ShowBoundaryCeiling = showBoundaryCeiling;
57+
var boundarySystem = CoreServices.BoundarySystem;
58+
boundarySystem.ShowFloor = showFloor;
59+
boundarySystem.ShowPlayArea = showPlayArea;
60+
boundarySystem.ShowTrackedArea = showTrackedArea;
61+
boundarySystem.ShowBoundaryWalls = showBoundaryWalls;
62+
boundarySystem.ShowBoundaryCeiling = showBoundaryCeiling;
7863
}
7964
}
8065

8166
private void OnEnable()
8267
{
83-
BoundarySystem?.RegisterHandler<IMixedRealityBoundaryHandler>(this);
68+
CoreServices.BoundarySystem?.RegisterHandler<IMixedRealityBoundaryHandler>(this);
8469
}
8570

8671
private void OnDisable()
8772
{
88-
BoundarySystem?.UnregisterHandler<IMixedRealityBoundaryHandler>(this);
73+
CoreServices.BoundarySystem?.UnregisterHandler<IMixedRealityBoundaryHandler>(this);
8974
}
9075

9176
#endregion MonoBehaviour Implementation
@@ -112,24 +97,27 @@ private void AddMarkers()
11297
float widthRect;
11398
float heightRect;
11499

115-
if (BoundarySystem == null) { return; }
100+
if (CoreServices.BoundarySystem == null)
101+
{
102+
return;
103+
}
116104

117-
if (!BoundarySystem.TryGetRectangularBoundsParams(out centerRect, out angleRect, out widthRect, out heightRect))
105+
if (!CoreServices.BoundarySystem.TryGetRectangularBoundsParams(out centerRect, out angleRect, out widthRect, out heightRect))
118106
{
119107
// If we have no boundary manager or rectangular bounds we will show no indicators
120108
return;
121109
}
122110

123111
// Get the materials needed for marker display
124-
GameObject playArea = BoundarySystem.GetPlayAreaVisualization();
112+
GameObject playArea = CoreServices.BoundarySystem.GetPlayAreaVisualization();
125113
if (playArea == null)
126114
{
127115
// Failed to get the play area visualization;
128116
return;
129117
}
130118
Material playAreaMaterial = playArea.GetComponent<Renderer>().sharedMaterial;
131119

132-
GameObject trackedArea = BoundarySystem.GetTrackedAreaVisualization();
120+
GameObject trackedArea = CoreServices.BoundarySystem.GetTrackedAreaVisualization();
133121
if (trackedArea == null)
134122
{
135123
// Failed to get the tracked area visualization;
@@ -155,12 +143,12 @@ private void AddMarkers()
155143

156144
Material material = null;
157145
// Check inscribed rectangle first
158-
if (BoundarySystem.Contains(position, UnityBoundary.Type.PlayArea))
146+
if (CoreServices.BoundarySystem.Contains(position, BoundaryType.PlayArea))
159147
{
160148
material = playAreaMaterial;
161149
}
162150
// Then check geometry
163-
else if (BoundarySystem.Contains(position, UnityBoundary.Type.TrackedArea))
151+
else if (CoreServices.BoundarySystem.Contains(position, BoundaryType.TrackedArea))
164152
{
165153
material = trackedAreaMaterial;
166154
}

Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoBasicSetup/Scripts/FollowEyeGazeGazeProvider.cs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,12 @@ public class FollowEyeGazeGazeProvider : MonoBehaviour
1616
[SerializeField]
1717
private float defaultDistanceInMeters = 2f;
1818

19-
private IMixedRealityInputSystem inputSystem = null;
20-
21-
/// <summary>
22-
/// The active instance of the input system.
23-
/// </summary>
24-
private IMixedRealityInputSystem InputSystem
25-
{
26-
get
27-
{
28-
if (inputSystem == null)
29-
{
30-
MixedRealityServiceRegistry.TryGetService<IMixedRealityInputSystem>(out inputSystem);
31-
}
32-
return inputSystem;
33-
}
34-
}
35-
3619
private void Update()
3720
{
38-
if (InputSystem?.GazeProvider != null)
21+
var gazeProvider = CoreServices.InputSystem?.GazeProvider;
22+
if (gazeProvider != null)
3923
{
40-
gameObject.transform.position = InputSystem.GazeProvider.GazeOrigin + InputSystem.GazeProvider.GazeDirection.normalized * defaultDistanceInMeters;
24+
gameObject.transform.position = gazeProvider.GazeOrigin + gazeProvider.GazeDirection.normalized * defaultDistanceInMeters;
4125
}
4226
}
4327
}

Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBase.cs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected IMixedRealityEyeSaccadeProvider EyeSaccadeProvider
131131
{
132132
if (eyeSaccadeProvider == null)
133133
{
134-
IMixedRealityEyeGazeDataProvider eyeGazeProvider = (InputSystem as IMixedRealityDataProviderAccess)?.GetDataProvider<IMixedRealityEyeGazeDataProvider>();
134+
IMixedRealityEyeGazeDataProvider eyeGazeProvider = (CoreServices.InputSystem as IMixedRealityDataProviderAccess)?.GetDataProvider<IMixedRealityEyeGazeDataProvider>();
135135
eyeSaccadeProvider = eyeGazeProvider?.SaccadeProvider;
136136
}
137137
return eyeSaccadeProvider;
@@ -140,23 +140,6 @@ protected IMixedRealityEyeSaccadeProvider EyeSaccadeProvider
140140

141141
#endregion
142142

143-
private IMixedRealityInputSystem inputSystem = null;
144-
145-
/// <summary>
146-
/// The active instance of the input system.
147-
/// </summary>
148-
protected IMixedRealityInputSystem InputSystem
149-
{
150-
get
151-
{
152-
if (inputSystem == null)
153-
{
154-
MixedRealityServiceRegistry.TryGetService<IMixedRealityInputSystem>(out inputSystem);
155-
}
156-
return inputSystem;
157-
}
158-
}
159-
160143
public abstract void Initialize();
161144
public abstract float ComputePanSpeed(float cursorPosInOneDir, float maxSpeed, float minDistFromCenterForAutoPan);
162145
public abstract int ZoomDir(bool zoomIn);
@@ -591,7 +574,7 @@ void IMixedRealitySourceStateHandler.OnSourceDetected(SourceStateEventData event
591574

592575
void IMixedRealitySourceStateHandler.OnSourceLost(SourceStateEventData eventData)
593576
{
594-
foreach (var pointer in InputSystem.GazeProvider.GazeInputSource.Pointers)
577+
foreach (var pointer in CoreServices.InputSystem.GazeProvider.GazeInputSource.Pointers)
595578
{
596579
pointer.IsFocusLocked = false;
597580
}

Assets/MixedRealityToolkit.Examples/Demos/EyeTracking/DemoScrollPanZoom/Scripts/BaseClasses/PanZoomBaseRectTransf.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public override bool UpdateCursorPosInHitBox()
176176
Vector3 halfsize = gameObject.transform.lossyScale / 2;
177177

178178
// Let's transform back to the origin: Translate & Rotate
179-
Vector3 transfHitPnt = InputSystem.EyeGazeProvider.HitPosition - center;
179+
Vector3 transfHitPnt = CoreServices.InputSystem.EyeGazeProvider.HitPosition - center;
180180

181181
// Rotate around the y axis
182182
transfHitPnt = Quaternion.AngleAxis(-(gameObject.transform.rotation.eulerAngles.y - 180), Vector3.up) * transfHitPnt;

0 commit comments

Comments
 (0)