using UnityEditor; using UnityEngine; using UnityEngine.EventSystems; namespace EZXR.Glass.Core { public partial class ARAbilities : MonoBehaviour { #region InputSystem [MenuItem("GameObject/XR Abilities/InputSystem", false, 20)] public static void EnableInputSystem() { if (FindObjectOfType() == null) { string filePath = "Assets/EZXRGlassSDK/Core/InputSystem/Prefabs/InputSystem.prefab"; if (AssetDatabase.LoadAssetAtPath(filePath) == null) { filePath = AssetDatabase.GUIDToAssetPath("4c1509f78a7904c9980227d2731ebe61"); } Core.PrefabUtility.InstantiatePrefabWithUndoAndSelection(AssetDatabase.LoadAssetAtPath(filePath)); } } #endregion #region EventSystem [MenuItem("GameObject/XR Abilities/Additional.../EventSystem", false, 20)] public static void EnableEventSystem() { if (FindObjectOfType() == null) { string filePath = "Assets/EZXRGlassSDK/Core/HandTracking/Resources/EventSystem.prefab"; if (AssetDatabase.LoadAssetAtPath(filePath) == null) { filePath = AssetDatabase.GUIDToAssetPath("6e33b2edc7ac4784ebe0163210ea60f2"); } Core.PrefabUtility.InstantiatePrefabWithUndoAndSelection(AssetDatabase.LoadAssetAtPath(filePath)); } } #endregion } }