Skip to content

Commit

Permalink
Update service framework and remove spatial awareness (moved to own p…
Browse files Browse the repository at this point in the history
…ackage) (#124)

* Update service framework

* Bump SF

* Remove spatial awareness
  • Loading branch information
FejZa authored May 15, 2024
1 parent c88b6f2 commit 82b0c73
Show file tree
Hide file tree
Showing 74 changed files with 53 additions and 2,792 deletions.
8 changes: 0 additions & 8 deletions Assets~/Profiles/SpatialAwarenessSystem.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 2 additions & 16 deletions Editor/EditorActiveProfileChangeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using RealityCollective.ServiceFramework.Services;
using RealityCollective.Utilities.Editor;
using RealityToolkit.Editor.Utilities;
using RealityToolkit.Input.Interfaces;
using RealityToolkit.SpatialAwareness.Definitions;
using RealityToolkit.SpatialAwareness.Interfaces;
using UnityEditor;
using UnityEngine;

Expand All @@ -24,27 +21,16 @@ private static void EditorApplication_hierarchyChanged()
{
if (ServiceManager.Instance != null && ServiceManager.Instance.HasActiveProfile)
{
if (ServiceManager.Instance.IsServiceEnabled<IInputService>() &&
if (ServiceManager.Instance.TryGetService<IInputService>(out _) &&
InputMappingAxisUtility.CheckUnityInputManagerMappings(ControllerMappingUtilities.UnityInputManagerAxes))
{
Debug.Log($"{nameof(IInputService)} was enabled, updated input axis mappings.");
}
else if (!ServiceManager.Instance.IsServiceEnabled<IInputService>() &&
else if (!ServiceManager.Instance.TryGetService<IInputService>(out _) &&
InputMappingAxisUtility.RemoveMappings(ControllerMappingUtilities.UnityInputManagerAxes))
{
Debug.Log($"{nameof(IInputService)} was disabled, removed input axis mappings.");
}

if (ServiceManager.Instance.IsServiceEnabled<ISpatialAwarenessService>() &&
LayerUtilities.CheckLayers(SpatialAwarenessSystemProfile.SpatialAwarenessLayers))
{
Debug.Log($"{nameof(ISpatialAwarenessService)} was enabled, spatial mapping layers added to project.");
}
else if (!ServiceManager.Instance.IsServiceEnabled<ISpatialAwarenessService>() &&
LayerUtilities.RemoveLayers(SpatialAwarenessSystemProfile.SpatialAwarenessLayers))
{
Debug.Log($"{nameof(ISpatialAwarenessService)} was disabled, spatial mapping layers removed to project.");
}
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions Editor/Profiles/SpatialAwarenessService.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 82b0c73

Please sign in to comment.