RecordingEditor.cs 854 B

1234567891011121314151617181920212223
  1. using EZXR.Glass.Recording;
  2. using UnityEditor;
  3. using UnityEngine;
  4. namespace EZXR.Glass.Core
  5. {
  6. public class RecordingEditor : MonoBehaviour
  7. {
  8. //[MenuItem("GameObject/XR Abilities/Additional.../RecordingManager", false, 100)]
  9. public static void EnableRecordingManager()
  10. {
  11. if (FindObjectOfType<RecordingManager>() == null)
  12. {
  13. string filePath = "Assets/EZXRGlassSDK/Core/Recording/Prefabs/RecordingManager.prefab";
  14. if (AssetDatabase.LoadAssetAtPath<GameObject>(filePath) == null)
  15. {
  16. filePath = AssetDatabase.GUIDToAssetPath("032a8da581f9c4244b251db68247618e");
  17. }
  18. PrefabUtility.InstantiatePrefabWithUndoAndSelection(AssetDatabase.LoadAssetAtPath<GameObject>(filePath));
  19. }
  20. }
  21. }
  22. }