Skip to content

Commit 53ef2a9

Browse files
committed
Merge branch 'prerelease/2.6.0_stabilization' into su_2.6
2 parents c81271f + 3be2f3a commit 53ef2a9

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

Assets/MRTK/Examples/Demos/ReadingMode/Scripts/ReadingModeSceneBehavior.cs

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
using Microsoft.MixedReality.Toolkit.CameraSystem;
55
using Microsoft.MixedReality.Toolkit.UI;
66
using UnityEngine;
7+
8+
#if UNITY_2019_3_OR_NEWER
9+
using Microsoft.MixedReality.Toolkit.Utilities;
10+
#endif // UNITY_2019_3_OR_NEWER
11+
12+
#if !UNITY_2020_1_OR_NEWER
713
using UnityEngine.XR;
14+
#endif // !UNITY_2020_1_OR_NEWER
815

916
namespace Microsoft.MixedReality.Toolkit.Examples.Demos.ReadingMode
1017
{
@@ -16,12 +23,32 @@ public class ReadingModeSceneBehavior : MonoBehaviour
1623
[SerializeField]
1724
private PinchSlider renderViewportScaleSlider = null;
1825

26+
private float previousSliderValue = -1;
27+
private const float MinScale = 0.001f;
28+
1929
private void Update()
2030
{
21-
if (renderViewportScaleSlider != null)
31+
if (renderViewportScaleSlider == null || renderViewportScaleSlider.SliderValue == previousSliderValue)
32+
{
33+
return;
34+
}
35+
36+
previousSliderValue = renderViewportScaleSlider.SliderValue;
37+
38+
#if UNITY_2019_3_OR_NEWER
39+
if (XRSubsystemHelpers.DisplaySubsystem != null)
40+
{
41+
XRSubsystemHelpers.DisplaySubsystem.scaleOfAllViewports = Mathf.Max(renderViewportScaleSlider.SliderValue, MinScale);
42+
return;
43+
}
44+
#endif // UNITY_2019_3_OR_NEWER
45+
46+
#if !UNITY_2020_1_OR_NEWER
47+
if (XRDevice.isPresent)
2248
{
23-
XRSettings.renderViewportScale = renderViewportScaleSlider.SliderValue;
49+
XRSettings.renderViewportScale = Mathf.Max(renderViewportScaleSlider.SliderValue, MinScale);
2450
}
51+
#endif // !UNITY_2020_1_OR_NEWER
2552
}
2653

2754
public void EnableReadingMode()
31.4 KB
Loading

Documentation/Tools/HolographicRemoting.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,13 @@ These issues are particularly relevant when running on **Unity 2019.3** or later
3333

3434
#### Import DotNetWinRT into the project
3535

36-
1. Install a NuGet client
36+
1. Download the [Mixed Reality Feature Tool](https://aka.ms/MRFeatureTool)
3737

38-
> [!Note]
39-
> The following instructions presume use of [NuGet for Unity](https://github.com/GlitchEnzo/NuGetForUnity/releases)
38+
1. In the **Discover features** view, select *Mixed Reality WinRT Projections*
4039

41-
1. Navigate to the NuGet client UI
40+
![Select DotNetWinRT package](../images/tools/remoting/SelectDotNetWinRT.png)
4241

43-
![Launch NuGet UI](../Images/Tools/Remoting/LaunchNuGetForUnity.png)
44-
45-
1. Locate the `Microsoft.Windows.MixedReality.DotNetWinRT` package
46-
47-
![Locate Package](../Images/Tools/Remoting/LocateDotNetWinRT.png)
48-
49-
1. Select Install
42+
1. Click **Get Features** and continue to [import the package](https://docs.microsoft.com/windows/mixed-reality/develop/unity/welcome-to-mr-feature-tool#3-importing-feature-packages).
5043

5144
#### DOTNETWINRT_PRESENT define written into player settings
5245

0 commit comments

Comments
 (0)