CaptureFromScreenEditor.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #if UNITY_EDITOR
  2. using UnityEngine;
  3. using UnityEditor;
  4. //-----------------------------------------------------------------------------
  5. // Copyright 2012-2022 RenderHeads Ltd. All rights reserved.
  6. //-----------------------------------------------------------------------------
  7. namespace RenderHeads.Media.AVProMovieCapture.Editor
  8. {
  9. [CanEditMultipleObjects]
  10. [CustomEditor(typeof(CaptureFromScreen))]
  11. public class CaptureFromScreenEditor : CaptureBaseEditor
  12. {
  13. private SerializedProperty _propCaptureMouseCursor;
  14. private SerializedProperty _propMouseCursor;
  15. protected override void GUI_Misc()
  16. {
  17. GUI_MouseCursor();
  18. base.GUI_Misc();
  19. }
  20. protected void GUI_MouseCursor()
  21. {
  22. EditorGUILayout.PropertyField(_propCaptureMouseCursor);
  23. if (_propCaptureMouseCursor.boolValue)
  24. {
  25. EditorGUILayout.PropertyField(_propMouseCursor);
  26. }
  27. }
  28. protected override void OnEnable()
  29. {
  30. base.OnEnable();
  31. _propCaptureMouseCursor = serializedObject.AssertFindProperty("_captureMouseCursor");
  32. _propMouseCursor = serializedObject.AssertFindProperty("_mouseCursor");
  33. }
  34. }
  35. }
  36. #endif