diff --git a/CHANGELOG.md b/CHANGELOG.md index c2a6532..0d0ad3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ # Changelog -## [4.2.0-preview.3] - 2020-08-19 +## [4.2.2] - 2021-02-15 +- Fix a usage of an obsolete XR Management API in editor code + +## [4.2.1] - 2021-02-11 +- Enable "warnings as errors" to make sure the package C# assemblies compile cleanly +- Fix a couple warnings triggered by the upgrade to XR Management `4.0.1` +- Fixed a bug where setting 'Force Multipass' to true was being ignored. +- Fixed an issue where eyetracking would fail in ZI. + +## [4.2.0] - 2021-01-26 +- Update XR Management to `4.0.1` +- Fixed a case where hands weren't properly shutdown when stopping the XR Input subsystem +- Fixed a bug discovered with a later version of Visual Studio 2019. +- Added an error message when attempting to use an unsupported MLSDK +- Fixed an issue where an unsupported MLSDK would prevent the Manifest Settings from rendering properly (Fixes FB# 1289174) + +## [4.2.0-preview.4] - 2020-10-28 +- Fix Issue 1286802: Multipass rendering to only renders in the left eye. + +## [4.2.0-preview.3] - 2020-10-22 - Fix issue causing CI testing to fail erroneously. ## [4.2.0-preview.2] - 2020-08-17 diff --git a/Editor/MagicLeapBuildProcessor.cs b/Editor/MagicLeapBuildProcessor.cs index e6d9cbd..c1eafeb 100644 --- a/Editor/MagicLeapBuildProcessor.cs +++ b/Editor/MagicLeapBuildProcessor.cs @@ -49,7 +49,7 @@ public bool ShouldIncludeRuntimePluginsInBuild(string path) if (generalSettings == null) return false; - foreach (var loader in generalSettings.Manager.loaders) + foreach (var loader in generalSettings.Manager.activeLoaders) { if (loader is MagicLeapLoader) return true; @@ -58,7 +58,7 @@ public bool ShouldIncludeRuntimePluginsInBuild(string path) return false; } - + // Remoting is only intended to work in the editor so builds are disallowed to have the libraries public bool ShouldIncludeRemotingPluginsInBuild(string path) => false; diff --git a/Editor/Manifest/ManifestEditorGUI.cs b/Editor/Manifest/ManifestEditorGUI.cs index 361d43e..3d7cd1d 100644 --- a/Editor/Manifest/ManifestEditorGUI.cs +++ b/Editor/Manifest/ManifestEditorGUI.cs @@ -12,6 +12,7 @@ internal static class ManifestEditorGUI internal static class Messages { internal const string kCannotLocateSDK = "Cannot find the Lumin SDK. Please specify the path to the Lumin SDK in the editor preferences"; + internal const string kUnusableSDK = "Your Lumin SDK appears to have an API level below the minimum API level. Please upgrade your Lumin SDK"; internal const string kShouldSynchronize = "Click the 'Synchronize' button below to update the privileges list against the Lumin SDK specified in the editor preferences. If you've recently upgraded the Lumin SDK, you'll need to do this to get access to newer privileges"; } class RenderState @@ -29,7 +30,10 @@ public static void RenderManifest(MagicLeapManifestSettings settings) var missingSdk = !SDKUtility.sdkAvailable; if (missingSdk) EditorGUILayout.HelpBox(Messages.kCannotLocateSDK, MessageType.Error, true); - using (new EditorGUI.DisabledScope(missingSdk)) + var invalidSdk = !SDKUtility.isCompatibleSDK; + if (invalidSdk) + EditorGUILayout.HelpBox(Messages.kUnusableSDK, MessageType.Error, true); + using (new EditorGUI.DisabledScope(missingSdk || invalidSdk)) { var apiLevel = serializedObject.FindProperty("m_MinimumAPILevel"); apiLevel.intValue = PlatformLevelSelector.SelectorGUI(apiLevel.intValue); diff --git a/Editor/Manifest/PlatformLevelSelector.cs b/Editor/Manifest/PlatformLevelSelector.cs index 36fa82d..e922a64 100644 --- a/Editor/Manifest/PlatformLevelSelector.cs +++ b/Editor/Manifest/PlatformLevelSelector.cs @@ -11,7 +11,7 @@ internal static class PlatformLevelSelector { public static int SelectorGUI(int value) { - if (SDKUtility.sdkAvailable) + if (SDKUtility.sdkAvailable && SDKUtility.isCompatibleSDK) return EditorGUILayout.IntPopup("Minimum API Level", EnsureValidValue(value), GetChoices().Select(c => $"API Level {c}").ToArray(), diff --git a/Runtime/Lumin/UnityMagicLeap.so b/Runtime/Lumin/UnityMagicLeap.so index 4a72bd4..add5deb 100644 Binary files a/Runtime/Lumin/UnityMagicLeap.so and b/Runtime/Lumin/UnityMagicLeap.so differ diff --git a/Runtime/MagicLeapLoader.cs b/Runtime/MagicLeapLoader.cs index 54d5ab7..fe92c92 100644 --- a/Runtime/MagicLeapLoader.cs +++ b/Runtime/MagicLeapLoader.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Runtime.InteropServices; using UnityEngine.XR; @@ -119,6 +120,10 @@ public override bool Start() if (!isLegacyDeviceActive) { + StartSubsystem(); + + // we need to set the layout after the display subsystem has started, as these values are not used during + // the XRDisplayProvider's startup (Starting the Subsystem). var settings = MagicLeapSettings.currentSettings; #if UNITY_2020_1_OR_NEWER if (settings != null && settings.forceMultipass) @@ -131,7 +136,6 @@ public override bool Start() else displaySubsystem.singlePassRenderingDisabled = false; #endif // UNITY_2020_1_OR_NEWER - StartSubsystem(); m_DisplaySubsystemRunning = true; } return true; @@ -251,7 +255,7 @@ internal static class XRMangementEditorExtensions internal static bool IsEnabledForPlatform(this XRLoader loader, BuildTargetGroup group) { var settings = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(group); - return settings?.Manager?.loaders?.Contains(loader) ?? false; + return settings?.Manager?.activeLoaders?.Contains(loader) ?? false; } internal static bool IsEnabledForPlatform(this XRLoader loader, BuildTarget target) diff --git a/Runtime/Windows/UnityMagicLeap.dll b/Runtime/Windows/UnityMagicLeap.dll index af799b5..2612650 100644 Binary files a/Runtime/Windows/UnityMagicLeap.dll and b/Runtime/Windows/UnityMagicLeap.dll differ diff --git a/Runtime/Windows/UnityMagicLeap.dll.lib b/Runtime/Windows/UnityMagicLeap.dll.lib index 5eed516..07c88cd 100644 Binary files a/Runtime/Windows/UnityMagicLeap.dll.lib and b/Runtime/Windows/UnityMagicLeap.dll.lib differ diff --git a/Runtime/macOS/UnityMagicLeap.bundle b/Runtime/macOS/UnityMagicLeap.bundle index 463bd9e..5f91c7a 100644 Binary files a/Runtime/macOS/UnityMagicLeap.bundle and b/Runtime/macOS/UnityMagicLeap.bundle differ diff --git a/package.json b/package.json index e2dcc7f..fe671e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.xr.magicleap", "displayName": "Magic Leap XR Plugin", - "version": "4.2.0-preview.3", + "version": "4.2.2", "unity": "2019.4", "unityRelease": "4f1", "description": "Provides rendering and spatial mapping support for Magic Leap.\n\nNOTE: As of Unity 2019.2, Legacy XR support for MagicLeap is disabled in favor of XR SDK", @@ -20,15 +20,15 @@ "com.unity.ugui": "1.0.0", "com.unity.xr.arsubsystems": "2.1.2", "com.unity.xr.interactionsubsystems": "1.0.1", - "com.unity.xr.management": "3.2.10" + "com.unity.xr.management": "4.0.1" }, "upmCi": { - "footprint": "e3b980d34d4e803b5e0075f504fa86da16092f1a" + "footprint": "22dcf23ec226992143f587df122aa3ad89c8bc32" }, "repository": { "url": "https://github.cds.internal.unity3d.com/unity/xr.sdk.magicleap.git", "type": "git", - "revision": "730b9d5ad169b27a149ee14b450cc78a115afee5" + "revision": "14c7c96e42a8f712d401c83e0bc8d3fec22c0e70" }, "samples": [ {