ARAbilities.cs 874 B

123456789101112131415161718192021222324
  1. using UnityEditor;
  2. using UnityEngine;
  3. namespace EZXR.Glass.Core
  4. {
  5. public partial class ARAbilities : MonoBehaviour
  6. {
  7. #region SystemManager
  8. [MenuItem("GameObject/XR Abilities/Additional.../SystemManager", false, 100)]
  9. public static void EnableSystemManager()
  10. {
  11. if (FindObjectOfType<SystemManager>() == null)
  12. {
  13. string filePath = "Assets/EZXRGlassSDK/Core/SystemManager/Prefabs/SystemManager.prefab";
  14. if (AssetDatabase.LoadAssetAtPath<GameObject>(filePath) == null)
  15. {
  16. filePath = AssetDatabase.GUIDToAssetPath("52a7e5cd09269b642a76e2048d9e43d1");
  17. }
  18. Core.PrefabUtility.InstantiatePrefabWithUndoAndSelection(AssetDatabase.LoadAssetAtPath<GameObject>(filePath));
  19. }
  20. }
  21. #endregion
  22. }
  23. }