NRDisplayOverlayEditor.cs 1.3 KB

1234567891011121314151617181920212223242526272829
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal.Experimental
  10. {
  11. using UnityEditor;
  12. using UnityEngine;
  13. [CustomEditor(typeof(NRDisplayOverlay))]
  14. public class NRDisplayOverlayEditor : Editor
  15. {
  16. public override void OnInspectorGUI()
  17. {
  18. NRDisplayOverlay overlay = (NRDisplayOverlay)target;
  19. if (overlay == null)
  20. {
  21. return;
  22. }
  23. overlay.targetEye = (NativeDevice)EditorGUILayout.EnumPopup(new GUIContent("Target Eye", "Which display this overlay should render to."), overlay.targetEye);
  24. }
  25. }
  26. }