Skip to content

Commit d8d79da

Browse files
authored
Merge pull request #6761 from microsoft/prerelease/2.2.0_stabilization
Prerelease/2.2.0 stabilization -> dev
2 parents bc0591d + 5717923 commit d8d79da

File tree

18 files changed

+203
-125
lines changed

18 files changed

+203
-125
lines changed

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/DotNetAdapter/DotNetAdapter.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="Microsoft.Windows.MixedReality.DotNetWinRT">
20-
<Version>0.5.1034</Version>
20+
<Version>0.5.*</Version>
2121
</PackageReference>
2222
<PackageReference Include="MSBuildForUnity">
23-
<Version>0.8.1</Version>
23+
<Version>0.8.*</Version>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
<PrivateAssets>all</PrivateAssets>
2626
</PackageReference>

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/Editor/WindowsMixedRealityCameraSettingsProfileInspector.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ public override void OnInspectorGUI()
3737
serializedObject.Update();
3838

3939
EditorGUILayout.Space();
40-
EditorGUILayout.LabelField("Mixed Reality Capture Settings", EditorStyles.boldLabel);
41-
4240
using (new EditorGUILayout.HorizontalScope())
4341
{
44-
EditorGUILayout.PropertyField(renderFromPVCameraForMixedRealityCapture, pvCameraRenderingTitle);
42+
EditorGUILayout.LabelField("Mixed Reality Capture Settings (Experimental)", EditorStyles.boldLabel);
4543
InspectorUIUtility.RenderDocumentationButton(MRCDocURL);
4644
}
4745

46+
EditorGUILayout.HelpBox("Render from PV Camera is supported on Unity 2018.4.13f1 or newer and 2019.3 or newer. Enabling the feature on other versions may result in incorrect capture behavior.", MessageType.Info);
47+
48+
EditorGUILayout.PropertyField(renderFromPVCameraForMixedRealityCapture, pvCameraRenderingTitle);
49+
4850
serializedObject.ApplyModifiedProperties();
4951
}
5052
}

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/Profiles/DefaultWindowsMixedRealityCameraSettingsProfile.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ MonoBehaviour:
1313
m_Name: DefaultWindowsMixedRealityCameraSettingsProfile
1414
m_EditorClassIdentifier:
1515
isCustomProfile: 0
16-
renderFromPVCameraForMixedRealityCapture: 1
16+
renderFromPVCameraForMixedRealityCapture: 0

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityCameraSettingsProfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
99
/// <summary>
1010
/// Configuration profile for the Windows Mixed Reality Camera settings provider.
1111
/// </summary>
12-
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Windows Mixed Reality Camera Settings Profile", fileName = "DefaultWindowsMixedRealityCameraSettingsProfile", order = 100)]
12+
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Windows Mixed Reality Camera Settings Profile", fileName = "WindowsMixedRealityCameraSettingsProfile", order = 100)]
1313
[MixedRealityServiceProfile(typeof(WindowsMixedRealityCameraSettings))]
1414
public class WindowsMixedRealityCameraSettingsProfile : BaseCameraSettingsProfile
1515
{
1616
[SerializeField]
1717
[Tooltip("If enabled, will render scene from PV camera projection matrix while MRC is active. This will ensure that holograms, such as hand meshes, remain visibly aligned in the video output.")]
18-
private bool renderFromPVCameraForMixedRealityCapture = true;
18+
private bool renderFromPVCameraForMixedRealityCapture = false;
1919

2020
/// <summary>
2121
/// Whether to use photo/video camera rendering for Mixed Reality Capture on Windows.

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -288,63 +288,84 @@ protected override void LayoutChildren()
288288
protected void ResolveGridLayout(Vector3[] grid, LayoutOrder order)
289289
{
290290
int cellCounter = 0;
291-
int iMax, jMax;
291+
int xMax, yMax;
292292

293293
switch (order)
294294
{
295295
case LayoutOrder.RowThenColumn:
296-
iMax = Columns;
297-
jMax = Rows;
296+
xMax = Columns;
297+
yMax = Rows;
298298
break;
299299
case LayoutOrder.ColumnThenRow:
300-
iMax = Columns;
301-
jMax = Rows;
300+
xMax = Columns;
301+
yMax = Rows;
302302
break;
303303
case LayoutOrder.Vertical:
304-
iMax = 1;
305-
jMax = NodeList.Count;
304+
xMax = 1;
305+
yMax = NodeList.Count;
306306
break;
307307
case LayoutOrder.Horizontal:
308-
iMax = NodeList.Count;
309-
jMax = 1;
308+
xMax = NodeList.Count;
309+
yMax = 1;
310310
break;
311311
default:
312-
iMax = Mathf.CeilToInt((float)NodeList.Count / rows);
313-
jMax = rows;
312+
xMax = Mathf.CeilToInt((float)NodeList.Count / rows);
313+
yMax = rows;
314314
break;
315315
}
316316

317-
float startOffsetX = (iMax * 0.5f) * CellWidth;
317+
float startOffsetX = (xMax * 0.5f) * CellWidth;
318318
if (anchor == LayoutAnchor.BottomLeft || anchor == LayoutAnchor.UpperLeft || anchor == LayoutAnchor.MiddleLeft)
319319
{
320320
startOffsetX = 0;
321321
}
322322
else if (anchor == LayoutAnchor.BottomRight || anchor == LayoutAnchor.UpperRight || anchor == LayoutAnchor.MiddleRight)
323323
{
324-
startOffsetX = iMax * CellWidth;
324+
startOffsetX = xMax * CellWidth;
325325
}
326326

327-
float startOffsetY = (jMax * 0.5f) * CellHeight;
327+
float startOffsetY = (yMax * 0.5f) * CellHeight;
328328
if (anchor == LayoutAnchor.UpperLeft || anchor == LayoutAnchor.UpperCenter || anchor == LayoutAnchor.UpperRight)
329329
{
330330
startOffsetY = 0;
331331
}
332332
else if (anchor == LayoutAnchor.BottomLeft || anchor == LayoutAnchor.BottomCenter || anchor == LayoutAnchor.BottomRight)
333333
{
334-
startOffsetY = jMax * CellHeight;
334+
startOffsetY = yMax * CellHeight;
335335
}
336336

337-
for (int i = 0; i < iMax; i++)
337+
if (layout == LayoutOrder.ColumnThenRow)
338338
{
339-
for (int j = 0; j < jMax; j++)
339+
for (int y = 0; y < yMax; y++)
340+
for (int x = 0; x < xMax; x++)
341+
{
342+
{
343+
if (cellCounter < NodeList.Count)
344+
{
345+
grid[cellCounter].Set((-startOffsetX + (x * CellWidth) + HalfCell.x) + NodeList[cellCounter].Offset.x,
346+
(startOffsetY - (y * CellHeight) - HalfCell.y) + NodeList[cellCounter].Offset.y,
347+
0.0f);
348+
}
349+
cellCounter++;
350+
}
351+
}
352+
353+
}
354+
else
355+
{
356+
357+
for (int x = 0; x < xMax; x++)
340358
{
341-
if (cellCounter < NodeList.Count)
359+
for (int y = 0; y < yMax; y++)
342360
{
343-
grid[cellCounter].Set((-startOffsetX + (i * CellWidth) + HalfCell.x) + NodeList[cellCounter].Offset.x,
344-
(startOffsetY - (j * CellHeight) - HalfCell.y) + NodeList[cellCounter].Offset.y,
345-
0.0f);
361+
if (cellCounter < NodeList.Count)
362+
{
363+
grid[cellCounter].Set((-startOffsetX + (x * CellWidth) + HalfCell.x) + NodeList[cellCounter].Offset.x,
364+
(startOffsetY - (y * CellHeight) - HalfCell.y) + NodeList[cellCounter].Offset.y,
365+
0.0f);
366+
}
367+
cellCounter++;
346368
}
347-
cellCounter++;
348369
}
349370
}
350371
}
@@ -436,13 +457,13 @@ private void Awake()
436457
#endif
437458
}
438459

439-
#region asset version migration
460+
#region asset version migration
440461
#if UNITY_EDITOR
441-
    private const int CurrentAssetVersion = 1;
462+
private const int CurrentAssetVersion = 1;
442463

443-
    [SerializeField]
444-
    [HideInInspector]
445-
    private int assetVersion = 0;
464+
[SerializeField]
465+
[HideInInspector]
466+
private int assetVersion = 0;
446467

447468
private void PerformVersionPatching()
448469
{

Assets/MixedRealityToolkit/Utilities/Editor/PackageManifest/PackageManifestUpdater.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Editor
1313
/// </summary>
1414
internal static class PackageManifestUpdater
1515
{
16+
private static string MSBuildRegistryUrl = "https://pkgs.dev.azure.com/UnityDeveloperTools/MSBuildForUnity/_packaging/UnityDeveloperTools/npm/registry";
17+
private static string MSBuildRegistryName = "MS Build for Unity";
18+
private static string[] MSBuildRegistryScopes = new string[] { "com.microsoft" };
19+
20+
private static string MSBuildPackageName = "com.microsoft.msbuildforunity";
21+
private static string MSBuildPackageVersion = "0.8.2";
22+
1623
/// <summary>
1724
/// Ensures the required settings exist in the package manager to allow for
1825
/// installing MSBuild for Unity.
@@ -69,25 +76,22 @@ internal static void EnsureMSBuildForUnity()
6976
}
7077

7178
// Attempt to find an entry in the scoped regstries collection for the MSBuild for Unity url
72-
const string msBuildRegistryUrl = "https://pkgs.dev.azure.com/UnityDeveloperTools/MSBuildForUnity/_packaging/UnityDeveloperTools/npm/registry";
7379
bool needToAddRegistry = true;
7480
foreach (ScopedRegistry registry in scopedRegistries)
7581
{
76-
if (registry.url == msBuildRegistryUrl)
82+
if (registry.url == MSBuildRegistryUrl)
7783
{
7884
needToAddRegistry = false;
7985
}
8086
}
8187

8288
// If no entry was found, add one.
83-
const string msBuildRegistryName = "MS Build for Unity";
84-
string[] msBuildRegistryScopes = new string[] { "com.microsoft" };
8589
if (needToAddRegistry)
8690
{
8791
ScopedRegistry registry = new ScopedRegistry();
88-
registry.name = msBuildRegistryName;
89-
registry.url = msBuildRegistryUrl;
90-
registry.scopes = msBuildRegistryScopes;
92+
registry.name = MSBuildRegistryName;
93+
registry.url = MSBuildRegistryUrl;
94+
registry.scopes = MSBuildRegistryScopes;
9195

9296
scopedRegistries.Add(registry);
9397
}
@@ -102,7 +106,6 @@ internal static void EnsureMSBuildForUnity()
102106
// Attempt to find the MSBuild for Unity package entry in the dependencies collection
103107
// This loop also identifies the dependecies collection line and the start / end of a
104108
// pre-existing scoped registries collections
105-
const string msBuildPackageName = "com.microsoft.msbuildforunity";
106109
bool needToAddPackage = true;
107110
for (int i = 0; i < manifestFileLines.Count; i++)
108111
{
@@ -118,18 +121,17 @@ internal static void EnsureMSBuildForUnity()
118121
{
119122
dependenciesStartIndex = i;
120123
}
121-
if (manifestFileLines[i].Contains(msBuildPackageName))
124+
if (manifestFileLines[i].Contains(MSBuildPackageName))
122125
{
123126
needToAddPackage = false;
124127
}
125128
}
126129

127130
// If no package was found add it to the dependencies collection.
128-
const string msBuildPackageVersion = "0.8.1";
129131
if (needToAddPackage)
130132
{
131133
// Add the package to the collection (pad the entry with four spaces)
132-
manifestFileLines.Insert(dependenciesStartIndex + 1, $" \"{msBuildPackageName}\": \"{msBuildPackageVersion}\",");
134+
manifestFileLines.Insert(dependenciesStartIndex + 1, $" \"{MSBuildPackageName}\": \"{MSBuildPackageVersion}\",");
133135
}
134136

135137
if (needToAddRegistry || needToAddPackage)

Documentation/CameraSystem/UnityArCameraSettings.md

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,12 @@
22

33
The Unity AR camera settings provider is an experimental MRTK component that enables mixed reality applications to run on Android and iOS devices.
44

5-
## Prerequisites
6-
7-
Before the Unity AR camera settings provider can be enabled in an application, the following steps need to be completed.
8-
9-
1. Download and import the **Microsoft.MixedReality.Toolkit.Providers.UnityAR** package, from GitHub or NuGet
10-
1. In the Unity Package Manager, ensure the following package(s) are installed:
11-
12-
| Unity 2018.4 | Unity 2019.x | Comments |
13-
| --- | --- | -- |
14-
| AR Foundation | AR Foundation | For Unity 2018.4, this package is included as a preview |
15-
| | XR Legacy Input Helpers | |
16-
| AR Core | | For Android device support |
17-
| AR Kit | | For iOS device support |
18-
19-
1. If using Unity 2019.x, the assembly definition file for the Unity AR provider needs to be modified to have the **UnityEngine.SpatialTracking** reference added.
20-
21-
![Unity AR assembly definition](../Images/CrossPlatform/UnityArAssemblyReferences.png)
22-
23-
## Enabling the Unity AR camera settings provider
24-
25-
The following steps presume use of the MixedRealityToolkit object. Steps required for other service registrars may be different.
26-
27-
1. Select the MixedRealityToolkit object in the scene hierarchy.
28-
29-
![MRTK Configured Scene Hierarchy](../Images/MRTK_ConfiguredHierarchy.png)
30-
31-
2. Navigate the Inspector panel to the camera system section and expand the **Camera Settings Providers** section.
32-
33-
![Expand settings providers](../Images/CameraSystem/ExpandProviders.png)
34-
35-
3. Click **Add Camera Settings Provider** and expand the newly added **New camera settings** entry.
36-
37-
![Expand new settings provider](../Images/CameraSystem/ExpandNewProvider.png)
38-
39-
4. Select the Unity AR Camera Settings provider
40-
41-
![Select Unity AR settings provider](../Images/CameraSystem/SelectUnityArSettings.png)
42-
43-
## Configuring the Unity AR camera settings provider
5+
## Unity AR camera settings provider options
446

457
![Unity AR camera settings configuration](../Images/CameraSystem/UnityArSettingsConfiguration.png)
468

9+
For a guide on how to add the provider to your scene: [How to configure MRTK for iOS and Android](../CrossPlatform/UsingARFoundation.md)
10+
4711
### Tracking settings
4812

4913
The Unity AR camera settings provider allows configuration options for how tracking is performed. These settings are specific to the Unity AR camera settings provider implementation.

Documentation/Contributing/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ If you have any questions, please reach out on the [mixed-reality-toolkit channe
66
You can join the Slack community via the [automatic invitation sender](https://holodevelopersslack.azurewebsites.net/).
77

88
## Submission process
9+
910
We provide several paths to enable developers to contribute to the Mixed Reality Toolkit, all starting with [creating a new Issue](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/new/choose).
1011

1112
<img src="../Images/Contributing/SelectIssueType.png" width="600">
@@ -17,6 +18,7 @@ From here you file:
1718
- **Feature request** - Proposal for a new Mixed Reality Toolkit feature
1819

1920
## Proposing Feature Requests
21+
2022
When requesting a new Mixed Reality Toolkit feature, it is important to document the customer benefit / problem to be solved. Once submitted, a feature request will be reviewed and discussed on GitHub. We encourage open and constructive discussion of each feature proposal to ensure that the work is beneficial to a large segment of customers.
2123

2224
To avoid needing to rework the feature, it is generally recommended that development of the feature does not begin during the review phase. Many times, the community review process uncovers one or more issues that may require significant changes in the proposed implementation.
@@ -42,4 +44,3 @@ When adding a bug fix or feature, follow these steps:
4244
1. Ensure the code and feature(s) are documented as described in the [Documentation Guidelines](DocumentationGuide.md).
4345
1. Ensure the code works as intended on all platforms. Please see [Release notes](../ReleaseNotes.md) for the list of supported platforms. For Windows UWP projects, code must be [WACK compliant](https://developer.microsoft.com/en-us/windows/develop/app-certification-kit). To do this, generate a Visual Studio solution, right click on project; **Store** > **Create App Packages**. Follow the prompts and run WACK tests. Make sure they all succeed.
4446
1. Follow the instructions at [Pull Requests](PullRequests.md) when making a pull request.
45-

Documentation/Contributing/CodingGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ When you fix a bug, write a test to ensure it does not regress in the future. If
5151
All Microsoft employees contributing new files should add the following standard License header at the top of any new files, exactly as shown below:
5252

5353
```c#
54-
// Copyright (c) Microsoft Corporation. All rights reserved.
55-
// Licensed under the MIT License. See LICENSE in the project root for license information.
54+
// Copyright (c) Microsoft Corporation.
55+
// Licensed under the MIT License.
5656
```
5757

5858
### Function / Method summary headers

0 commit comments

Comments
 (0)