Skip to content

Commit 1f2cc3e

Browse files
committed
Adding Scene Understanding.
1 parent f4b6f81 commit 1f2cc3e

16 files changed

+53698
-36837
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using UnityEngine;
5+
6+
namespace Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking
7+
{
8+
/// <summary>
9+
/// Automatically loads a given Mixed Reality Toolkit configuration profile when loading up the scene.
10+
/// </summary>
11+
[AddComponentMenu("Scripts/MRTK/Examples/LoadProfiles")]
12+
public class LoadProfiles : MonoBehaviour
13+
{
14+
[Tooltip("Mixed Reality Toolkit profile to load.")]
15+
[SerializeField]
16+
private MixedRealityToolkitConfigurationProfile configProfile = null;
17+
18+
public void LoadProfile()
19+
{
20+
if ((configProfile != null) && (MixedRealityToolkit.Instance != null))
21+
{
22+
MixedRealityToolkit.Instance.ActiveProfile = configProfile;
23+
Debug.Log($"Loading new MRTK configuration profile: {configProfile.name}");
24+
configProfile = null;
25+
}
26+
}
27+
}
28+
}

Assets/MRTK/Examples/Common/Scripts/LoadProfiles.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)