Skip to content

Commit 52d27c8

Browse files
authored
Adjustment for sample shared and sample scenario, prepare for 1.9 API… (#162)
* Adjustment for sample shared and sample scenario, prepare for 1.9 API deprecation. * Fixed a typo
1 parent 5e5f84a commit 52d27c8

File tree

9 files changed

+44
-18
lines changed

9 files changed

+44
-18
lines changed

AzureSpatialAnchorsSample/Packages/packages-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"source": "local",
4949
"dependencies": {
5050
"com.microsoft.mixedreality.openxr": "1.7.0",
51-
"com.microsoft.mrtk.graphicstools.unity": "0.4.0"
51+
"com.microsoft.mrtk.graphicstools.unity": "0.5.0"
5252
}
5353
},
5454
"com.microsoft.mixedreality.toolkit.foundation": {

RemotingSample/Packages/packages-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"source": "local",
2929
"dependencies": {
3030
"com.microsoft.mixedreality.openxr": "1.7.0",
31-
"com.microsoft.mrtk.graphicstools.unity": "0.4.0"
31+
"com.microsoft.mrtk.graphicstools.unity": "0.5.0"
3232
}
3333
},
3434
"com.microsoft.mixedreality.toolkit.foundation": {

SampleScenarios/Microsoft.MixedReality.OpenXR.SampleScenarios.asmdef

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"name": "com.unity.xr.arfoundation",
2323
"expression": "5.0.0",
2424
"define": "USE_ARFOUNDATION_5_OR_NEWER"
25+
},
26+
{
27+
"name": "com.microsoft.mixedreality.openxr",
28+
"expression": "1.9.0",
29+
"define": "USE_MICROSOFT_OPENXR_PLUGIN_1_9_OR_NEWER"
2530
}
2631
],
2732
"noEngineReferences": false

SampleScenarios/Scenarios/AnchorSample/Scripts/AnchorPersistenceSample.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ protected async void OnEnable()
5454

5555
m_arAnchorManager.anchorsChanged += AnchorsChanged;
5656

57-
m_anchorStore = await m_arAnchorManager.LoadAnchorStoreAsync();
57+
#if USE_MICROSOFT_OPENXR_PLUGIN_1_9_OR_NEWER
58+
m_anchorStore = await XRAnchorStore.LoadAnchorStoreAsync(m_arAnchorManager.subsystem);
59+
#else
60+
m_anchorStore = await XRAnchorStore.LoadAsync(m_arAnchorManager.subsystem);
61+
#endif
5862
if (m_anchorStore == null)
5963
{
6064
Debug.Log("XRAnchorStore not available, sample anchor persistence functionality will not be enabled.");

SampleScenarios/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "com.microsoft.mixedreality.openxr.samplescenarios",
33
"displayName": "Mixed Reality OpenXR Sample Scenarios",
4-
"version": "0.0.4",
5-
"unity": "2020.3",
4+
"version": "0.0.6",
5+
"unity": "2021.3",
66
"msftFeatureCategory": "Platform Support",
77
"description": "Scenarios showcasing Mixed Reality OpenXR features.",
88
"keywords": [
@@ -21,10 +21,8 @@
2121
},
2222
"license": "MIT",
2323
"files": [
24-
"/Scenarios*",
25-
"Microsoft.MixedReality.OpenXR.SampleScenarios.asmdef*",
26-
"LICENSE.md*",
27-
"package.json*",
28-
"!*.pdb*"
24+
"/Scenarios/**/*",
25+
"*",
26+
"!**/*.pdb*"
2927
]
3028
}

SampleShared/Assets/Prefabs/Axes.prefab

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Transform:
2828
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
2929
m_LocalPosition: {x: 0, y: 0, z: 0}
3030
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
31+
m_ConstrainProportionsScale: 0
3132
m_Children: []
3233
m_Father: {fileID: 9045106990711866059}
3334
m_RootOrder: 0
@@ -51,6 +52,7 @@ MeshRenderer:
5152
m_CastShadows: 0
5253
m_ReceiveShadows: 0
5354
m_DynamicOccludee: 1
55+
m_StaticShadowCaster: 0
5456
m_MotionVectors: 1
5557
m_LightProbeUsage: 0
5658
m_ReflectionProbeUsage: 0
@@ -109,6 +111,7 @@ Transform:
109111
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
110112
m_LocalPosition: {x: 0, y: 0, z: 0}
111113
m_LocalScale: {x: 1, y: 1, z: 1}
114+
m_ConstrainProportionsScale: 0
112115
m_Children: []
113116
m_Father: {fileID: 9045106990711866059}
114117
m_RootOrder: 2
@@ -132,6 +135,7 @@ MeshRenderer:
132135
m_CastShadows: 0
133136
m_ReceiveShadows: 0
134137
m_DynamicOccludee: 1
138+
m_StaticShadowCaster: 0
135139
m_MotionVectors: 1
136140
m_LightProbeUsage: 0
137141
m_ReflectionProbeUsage: 0
@@ -190,6 +194,7 @@ Transform:
190194
m_LocalRotation: {x: 0, y: 0.70710677, z: 0.70710677, w: 0}
191195
m_LocalPosition: {x: 0, y: 0, z: 0}
192196
m_LocalScale: {x: 1, y: 1, z: 1}
197+
m_ConstrainProportionsScale: 0
193198
m_Children: []
194199
m_Father: {fileID: 9045106990711866059}
195200
m_RootOrder: 3
@@ -213,6 +218,7 @@ MeshRenderer:
213218
m_CastShadows: 0
214219
m_ReceiveShadows: 0
215220
m_DynamicOccludee: 1
221+
m_StaticShadowCaster: 0
216222
m_MotionVectors: 1
217223
m_LightProbeUsage: 0
218224
m_ReflectionProbeUsage: 0
@@ -271,6 +277,7 @@ Transform:
271277
m_LocalRotation: {x: 0.70710677, y: 0.70710677, z: 0, w: 0}
272278
m_LocalPosition: {x: 0, y: 0, z: 0}
273279
m_LocalScale: {x: 1, y: 1, z: 1}
280+
m_ConstrainProportionsScale: 0
274281
m_Children: []
275282
m_Father: {fileID: 9045106990711866059}
276283
m_RootOrder: 1
@@ -294,6 +301,7 @@ MeshRenderer:
294301
m_CastShadows: 0
295302
m_ReceiveShadows: 0
296303
m_DynamicOccludee: 1
304+
m_StaticShadowCaster: 0
297305
m_MotionVectors: 1
298306
m_LightProbeUsage: 0
299307
m_ReflectionProbeUsage: 0
@@ -351,6 +359,7 @@ Transform:
351359
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
352360
m_LocalPosition: {x: 0, y: 0, z: 0}
353361
m_LocalScale: {x: 1, y: 1, z: 1}
362+
m_ConstrainProportionsScale: 0
354363
m_Children:
355364
- {fileID: 7422490303879603107}
356365
- {fileID: 8999416023320091584}

SampleShared/Assets/Prefabs/TextPanel.prefab

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ GameObject:
1010
m_Component:
1111
- component: {fileID: 7471063828548225205}
1212
- component: {fileID: 3053082487779848052}
13+
- component: {fileID: 4517569666841396487}
1314
m_Layer: 0
1415
m_Name: TextPanel
1516
m_TagString: Untagged
@@ -50,6 +51,18 @@ MonoBehaviour:
5051
m_foregroundColor: {r: 1, g: 1, b: 1, a: 1}
5152
m_backgroundColor: {r: 0.26666668, g: 0.29411766, b: 0.32941177, a: 1}
5253
m_minimumWidth: 400
54+
--- !u!114 &4517569666841396487
55+
MonoBehaviour:
56+
m_ObjectHideFlags: 0
57+
m_CorrespondingSourceObject: {fileID: 0}
58+
m_PrefabInstance: {fileID: 0}
59+
m_PrefabAsset: {fileID: 0}
60+
m_GameObject: {fileID: 308227702559030708}
61+
m_Enabled: 1
62+
m_EditorHideFlags: 0
63+
m_Script: {fileID: 11500000, guid: 8d66e10dc0c01cf448ee8aa4a9c572b5, type: 3}
64+
m_Name:
65+
m_EditorClassIdentifier:
5366
--- !u!1 &3954227148511934971
5467
GameObject:
5568
m_ObjectHideFlags: 0

SampleShared/Assets/Scripts/RuntimeInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ string ITextProvider.UpdateText()
4141
$"\nMixed Reality OpenXR Plugin {typeof(OpenXRContext).Assembly.GetName().Version}" +
4242
$"\n{runtimeName}" +
4343
$"\n{GetDisplayInfo()}" +
44-
$"\nAR Session State: {ARSession.state}, {GetTrackingMode()}, {GetOriginMode()}" +
4544
$"\nHead tracking state: {GetTrackingState(XRNode.Head)}" +
4645
$"\nLeft Hand tracking state: {GetTrackingState(XRNode.LeftHand)}" +
4746
$"\nRight Hand tracking state: {GetTrackingState(XRNode.RightHand)}";

SampleShared/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "com.microsoft.mixedreality.openxr.sampleshared",
33
"displayName": "Mixed Reality OpenXR Sample Shared",
4-
"version": "0.0.5",
5-
"unity": "2020.3",
4+
"version": "0.0.6",
5+
"unity": "2021.3",
66
"msftFeatureCategory": "Platform Support",
77
"description": "Shared assets and utilities for Mixed Reality OpenXR samples.",
88
"keywords": [
@@ -20,10 +20,8 @@
2020
},
2121
"license": "MIT",
2222
"files": [
23-
"/Assets*",
24-
"Microsoft.MixedReality.OpenXR.SampleShared.asmdef*",
25-
"LICENSE.md*",
26-
"package.json*",
27-
"!*.pdb*"
23+
"/Assets/**/*",
24+
"*",
25+
"!**/*.pdb*"
2826
]
2927
}

0 commit comments

Comments
 (0)