Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Sample/Assets/Scripts/SampleQRCodes.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"rootNamespace": "",
"references": [
"Microsoft.MixedReality.Toolkit",
"Unity.XR.WindowsMixedReality"
"Unity.XR.WindowsMixedReality",
"Microsoft.MixedReality.OpenXR"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand All @@ -17,6 +18,11 @@
"name": "com.unity.xr.windowsmr",
"expression": "1.0.0",
"define": "UNITY_XR_WINDOWSMR"
},
{
"name": "com.microsoft.mixedreality.openxr",
"expression": "1.4.0",
"define": "MIXED_REALITY_OPENXR"
}
],
"noEngineReferences": false
Expand Down
8 changes: 8 additions & 0 deletions Sample/Assets/Scripts/SpatialGraphNodeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
using UnityEngine;
using Microsoft.MixedReality.Toolkit.Utilities;

#if MIXED_REALITY_OPENXR
using Microsoft.MixedReality.OpenXR;
#else
using SpatialGraphNode = Microsoft.MixedReality.SampleQRCodes.WindowsXR.SpatialGraphNode;
#endif

namespace Microsoft.MixedReality.SampleQRCodes
{
Expand All @@ -24,7 +28,11 @@ void Update()

if (node != null)
{
#if MIXED_REALITY_OPENXR
if (node.TryLocate(FrameTime.OnUpdate, out Pose pose))
#else
if (node.TryLocate(out Pose pose))
#endif
{
// If there is a parent to the camera that means we are using teleport and we should not apply the teleport
// to these objects so apply the inverse
Expand Down
14 changes: 14 additions & 0 deletions Sample/Assets/XR/Loaders/Open XR Loader.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3552e428dc7646a88de3ed3650f87da, type: 3}
m_Name: Open XR Loader
m_EditorClassIdentifier:
8 changes: 8 additions & 0 deletions Sample/Assets/XR/Loaders/Open XR Loader.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading