Skip to content

Commit

Permalink
2.0.0-preview.15 - 2019/03/07
Browse files Browse the repository at this point in the history
@2019.1
  • Loading branch information
ErikMoczi committed Mar 8, 2019
1 parent 06034ab commit d048ee6
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 12 deletions.
5 changes: 4 additions & 1 deletion package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [2.0.0-preview.15] - 2019-03-06
- Fix an issue where MLSpatialMapper fails to initialize if enabled after entering playmode using ML Remote
- Fix an number of issues blocking package publication

## [2.0.0-preview.14] - 2019-03-05
- Initial Production release
- Fix a number of issues causing instabilty when using ML Remote
9 changes: 5 additions & 4 deletions package/Documentation~/com.unity.xr.magicleap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Use the *Magic Leap XR Plugin* package enables Magic Leap Spatial Mapping support via Unity's multi-platform XR API. This package implements the following XR Subsystems:

* [Display](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Experimental.XR.XRDisplaySubsystem.html) (Not Yet Implemented)
* [Input](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Experimental.XR.XRInputSubsystem.html) (Not Yet Implemented)
* [Meshing](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Experimental.XR.XRMeshingSubsystem.html)
* [Display](https://docs.unity3d.com/Documentation/ScriptReference/Experimental.XR.XRDisplaySubsystem.html) (Not Yet Implemented)
* [Input](https://docs.unity3d.com/Documentation/ScriptReference/Experimental.XR.XRInputSubsystem.html) (Not Yet Implemented)
* [Meshing](https://docs.unity3d.com/2019.1/Documentation/ScriptReference/Experimental.XR.XRMeshSubsystem.html)

This version of *Magic Leap XR Plugin* supports the meshing functionality provided by the Magic Leap One:

Expand Down Expand Up @@ -70,7 +70,7 @@ If you wish to have the device start at a different location within the Unity sc

This version of *Magic Leap XR Plugin* is compatible with the following versions of the Unity Editor:

* 2018.3 Magic Leap Technical Preview 9 and later (recommended)
* Unity 2019.1 Beta or later (recommended)

## Known limitations

Expand All @@ -88,3 +88,4 @@ This version of *Magic Leap XR Plugin* includes:
|---|---|
|June 1, 2018|Create initial documentation.|
|August 17, 2018|Minor updates to docs to refer to 2018.3 version.|
|March 5, 2019|Minor updates to docs to refer to 2019.1 version.|
5 changes: 5 additions & 0 deletions package/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
XR Support for Magic Leap copyright © [YEAR] Unity Technologies ApS

Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).

Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
32 changes: 32 additions & 0 deletions package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Magic Leap

This package provides support for developing Magic Leap applications using Unity.
Currently, it provides necessary functionality to enable rendering and spatial mapping
capabilities.

## How to develop this package

### Prerequisites

- git clone the [`com.unity.xr.magicleap`](https://github.cds.internal.unity3d.com/xr/sdk/magicleap) project.
- use the latest 2019.1 installers, or check out the latest revision of `platform/lumin`.
- `cd magicleap; [mono] bee.exe` (on Windows, you can execute bee.exe directly; everywhere else requires you launch it via mono)
- open one of the projects under `./TestProjects/`
- If you have any C# compilation errors, something is wrong.

### How to build this package

We are using Bee to build. You must be in the repository root:

```
> [mono] ./bee
```

If you are a Unity employee, Bee will try to automatically download a compatible SDK for you. If Bee cannot find a suitable MLSDK (or if you need to explictly override the one it does find), You may set the `LUMINSDK_UNITY` environment variable to the MLDSK path you would like to use. Example:
```
D:\mlsdks\MLSDK_Mainline_MLTP6_0.15.0_06052018\internal_mlsdk_win64_full\mlsdk
```

This repository requires version 0.18.0 of the MLSDK. It will probably work with a newer version, but it's currently unsupported.

Ping `@cary` or `@stuartr` if you have questions.
Binary file modified package/Runtime/Lumin/UnityMagicLeap.so
Binary file not shown.
12 changes: 11 additions & 1 deletion package/Runtime/MLSpatialMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using UnityEngine.Lumin;

#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.XR.MagicLeap.Remote;
#endif

Expand Down Expand Up @@ -485,12 +486,21 @@ void Init()
void OnEnable()
{
#if UNITY_EDITOR && PLATFORM_LUMIN
MagicLeapRemoteManager.canInitializeSubsystems += Init;
StartCoroutine(WaitForMagicLeapRemote());
#else
Init();
#endif // UNITY_EDITOR && PLATFORM_LUMIN
}

#if UNITY_EDITOR && PLATFORM_LUMIN
IEnumerator WaitForMagicLeapRemote()
{
while (!MagicLeapRemoteManager.isInitialized)
yield return null;
Init();
}
#endif // UNITY_EDITOR && PLATFORM_LUMIN

void OnDisable()
{
if (s_MeshSubsystem != null)
Expand Down
13 changes: 9 additions & 4 deletions package/Runtime/Remote/MagicLeapRemoteManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class MagicLeapRemoteManager

private static Dictionary<string, string> s_PluginLookupCache = new Dictionary<string, string>();

private static bool s_MagicLeapRemoteInitialized = false;

static class Native
{
[DllImport("UnityMagicLeap", EntryPoint="UnityMagicLeap_RemoteSetLoaderCallback")]
Expand Down Expand Up @@ -82,23 +84,25 @@ static IntPtr LoadLibrary(string path)
#endif
}

public static bool isInitialized
{
get { return s_MagicLeapRemoteInitialized; }
}

static MagicLeapRemoteManager()
{
EditorApplication.playModeStateChanged -= PlaymodeStateChanged;
EditorApplication.playModeStateChanged += PlaymodeStateChanged;
}

public static event Action canInitializeSubsystems;

static void PlaymodeStateChanged(PlayModeStateChange state)
{
switch (state)
{
case PlayModeStateChange.EnteredPlayMode:
{
SetLoaderCallback();
if (canInitializeSubsystems != null)
canInitializeSubsystems();
s_MagicLeapRemoteInitialized = true;
break;
}
case PlayModeStateChange.ExitingEditMode:
Expand All @@ -108,6 +112,7 @@ static void PlaymodeStateChanged(PlayModeStateChange state)
}
case PlayModeStateChange.ExitingPlayMode:
{
s_MagicLeapRemoteInitialized = false;
Shutdown();
break;
}
Expand Down
1 change: 1 addition & 0 deletions package/Runtime/Rendering/MagicLeapCamera.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

Expand Down
Binary file modified package/Runtime/Windows/UnityMagicLeap.dll
Binary file not shown.
Binary file modified package/Runtime/Windows/UnityMagicLeap.dll.lib
Binary file not shown.
Binary file modified package/Runtime/macOS/UnityMagicLeap.bundle
Binary file not shown.
15 changes: 15 additions & 0 deletions package/Third Party Notices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This package contains third-party software components governed by the license(s) indicated below:
---------

Component Name: [provide component name]

License Type: [Provide license type, i.e. "MIT", "Apache 2.0"]

[Provide License Details]

---------
Component Name: [provide component name]

License Type: [Provide license type, i.e. "MIT", "Apache 2.0"]

[Provide License Details]
4 changes: 2 additions & 2 deletions package/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.xr.magicleap",
"displayName": "Magic Leap",
"version": "2.0.0-preview.14",
"version": "2.0.0-preview.15",
"unity": "2019.1",
"description": "Provides rendering and spatial mapping support for Magic Leap.",
"keywords": [
Expand All @@ -14,6 +14,6 @@
],
"dependencies": {},
"repository": {
"revision": "f79d402be0d55c13c72104b0d83ffbe089cb1ff7"
"revision": "6ded4af07cd20adc3699e585dd5b2bbf061fe114"
}
}
1 change: 1 addition & 0 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
2.0.0-preview.12
2.0.0-preview.13
2.0.0-preview.14
2.0.0-preview.15

0 comments on commit d048ee6

Please sign in to comment.