Skip to content

Commit

Permalink
Release v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bsawyer-ml committed Jun 14, 2023
1 parent 10dfef9 commit af98077
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Assets/MagicLeap/Examples/Scenes/EyeTracking.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18018606, g: 0.22559257, b: 0.30678663, a: 1}
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -941,12 +941,12 @@ PrefabInstance:
tracking.\r\nThe example provides a EyeTrackingExample script that drives
parameters of the eye tracking API and displays tracking points and details.\r\n\r\nThe
scene detects where eyes are pointed and displays the cubes in your environment
as you look around. Details about eye tracking are displayed above. Bumper
is used to switch between tracking modes.\r\n\r\nTracking Modes:\r\nBoth
Eyes - Tracks each eye separately and displays for each eye it's focus point.\r\nFixation
Point - Displays both eyes approximate focus point.\r\n \r\n<color=#B7B7B8><b>Mandatory
permissions required by this feature</b></color>\r\n\r\n<color=#B7B7B8><b>Permissions
required by this example</b></color>"
as you look around. Details about eye tracking are displayed above.\n\r\nTracking
Modes:\r\nBoth Eyes - Tracks each eye separately and displays for each eye
it's focus point.\r\nFixation Point - Displays both eyes approximate focus
point.\r\n \r\n<color=#B7B7B8><b>Mandatory permissions required by this
feature</b></color>\r\n\r\n<color=#B7B7B8><b>Permissions required by this
example</b></color>"
objectReference: {fileID: 0}
- target: {fileID: 9144045081354614237, guid: 6906f74934047d24e9a47bbdd1afb57a,
type: 3}
Expand Down
2 changes: 1 addition & 1 deletion Assets/MagicLeap/Examples/Scripts/AnchorsExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private void HandleOnTrigger(InputAction.CallbackContext obj)
{
if (MLPermissions.CheckPermission(MLPermission.SpatialAnchors).IsOk)
{
MLAnchors.Anchor.Create(new Pose(controllerActions.Position.ReadValue<Vector3>(), controllerActions.Rotation.ReadValue<Quaternion>()), 300, out MLAnchors.Anchor anchor);
MLAnchors.Anchor.Create(new Pose(controllerActions.Position.ReadValue<Vector3>(), controllerActions.Rotation.ReadValue<Quaternion>()), 0, out MLAnchors.Anchor anchor);
anchor.Publish();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/MagicLeap/Examples/Scripts/EyeTrackingExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void Update()
$"Center:\n({eyes.leftEyePosition.x:F2}, {eyes.leftEyePosition.y:F2}, {eyes.leftEyePosition.z:F2})\n" +
$"Gaze:\n({leftEyeForwardGaze.x:F2}, {leftEyeForwardGaze.y:F2}, {leftEyeForwardGaze.z:F2})\n" +
$"Confidence:\n{trackingState.LeftCenterConfidence:F2}\n" +
$"Pupil Size:\n{eyes.leftEyeOpenAmount:F2}";
$"Openness:\n{eyes.leftEyeOpenAmount:F2}";

leftEyeTextStatic.text = leftEyeText;

Expand All @@ -117,7 +117,7 @@ private void Update()
$"Center:\n({eyes.rightEyePosition.x:F2}, {eyes.rightEyePosition.y:F2}, {eyes.rightEyePosition.z:F2})\n" +
$"Gaze:\n({rightEyeForwardGaze.x:F2}, {rightEyeForwardGaze.y:F2}, {rightEyeForwardGaze.z:F2})\n" +
$"Confidence:\n{trackingState.RightCenterConfidence:F2}\n" +
$"Pupil Size:\n{eyes.rightEyeOpenAmount:F2}";
$"Openness:\n{eyes.rightEyeOpenAmount:F2}";

rightEyeTextStatic.text = rightEyeText;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
},
{
"m_Id": "d77e510b6f994fe59405586cda287747"
},
{
"m_Id": "cc11a3cf66fd42758b05ea6c329caafd"
}
],
"m_GroupDatas": [
Expand Down Expand Up @@ -382,6 +385,20 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "d77e510b6f994fe59405586cda287747"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "cc11a3cf66fd42758b05ea6c329caafd"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
Expand Down Expand Up @@ -422,6 +439,9 @@
"m_Blocks": [
{
"m_Id": "cc0efaa5b7f848c4afed6bf810d7cf5c"
},
{
"m_Id": "cc11a3cf66fd42758b05ea6c329caafd"
}
]
},
Expand Down Expand Up @@ -1000,7 +1020,7 @@
"m_Id": "a8ebbc2fce694d37826c20a09dc584eb"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
"m_SurfaceType": 1,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
Expand Down Expand Up @@ -2434,6 +2454,40 @@
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
}

{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "cc11a3cf66fd42758b05ea6c329caafd",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Alpha",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "e6cd0095942b46b4aafb7fb8f1cf167b"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
}

{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.AddNode",
Expand Down Expand Up @@ -2600,6 +2654,21 @@
]
}

{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "e6cd0095942b46b4aafb7fb8f1cf167b",
"m_Id": 0,
"m_DisplayName": "Alpha",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Alpha",
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}

{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
Expand Down
17 changes: 17 additions & 0 deletions Assets/MagicLeap/Examples/Scripts/WebRTC/MLWebRTCExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class MLWebRTCExample : MonoBehaviour
private bool waitingForAnswer = false;
private bool waitingForAnswerGetRequest = false;
private bool remotePeerDisconnected = false;
private bool shouldBeConnected = false;

private string serverAddress = "";
private string serverURI = "";
Expand Down Expand Up @@ -230,6 +231,8 @@ public void Login()
uiRoot.SetParent(null);
DontDestroyOnLoad(uiRoot.gameObject);
}

shouldBeConnected = true;
});
}
catch (UriFormatException)
Expand Down Expand Up @@ -893,6 +896,8 @@ public void Disconnect()

remoteId = "";
localId = "";

shouldBeConnected = false;
}

private void LocalVideoSource_OnCaptureStatusChanged(bool destroyed)
Expand Down Expand Up @@ -929,6 +934,18 @@ private void OnPermissionGranted(string permission)
StartAfterPermissions();
}
}

private void OnApplicationPause(bool pause)
{
if(!pause && shouldBeConnected)
{
var result = connection.IsConnected(out bool isConnected);
if(result.IsOk && !isConnected)
{
Connect(PlayerPrefs.GetString(PlayerPrefs_ServerAddress_Key));
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.magicleap.unitysdk": "1.7.0"
"com.magicleap.unitysdk": "1.8.0"
},
"scopedRegistries": [
{
Expand Down
2 changes: 1 addition & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.magicleap.unitysdk": {
"version": "1.7.0",
"version": "1.8.0",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The files in this project can change or even be removed from one release to anot

## Compatible with
- Unity Editor 2022.2
- Magic Leap Unity SDK 1.7.0
- Magic Leap Unity SDK 1.8.0

# Copyright
Copyright (c) 2020-present Magic Leap, Inc. All Rights Reserved.
Expand Down

0 comments on commit af98077

Please sign in to comment.