This repository was archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…se, DragExit) to PointerEvents (Mac side)
…dgets into zxw/support_editor_dragdrop
Now that we have made this change, do we need to update the dll file? |
yes we do. I have updated the Mac library (Debug version) so that you can test the functionality on your Mac. I will update other libraries once this PR is approved |
SiyaoHuang
reviewed
Nov 30, 2021
SiyaoHuang
approved these changes
Nov 30, 2021
…logies/com.unity.uiwidgets into zxw/support_editor_dragdrop
all libraries are updated and tested |
guanghuispark
approved these changes
Dec 1, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to add Drag&Drop support for UIWigetsEditorWindow, which enables features like:
(1) user can drag a Unity GameObject into a UIWigetsEditorWindow and drop it inside this window;
(2) user can drag any file from the OS (e.g., FileOpenDialog or Finder (on Mac)) into a UIWigetsEditorWindow and drop it inside this window;
This PR also modifies UIWidgets libraries.
How to Use:
(1) You need to use
UIWidgetsEditorBinding
to create the App in themain
method of your UIWidgetsEditorPanel like:(2) The functionality is wrapped inside a widget:
UnityObjectDetector
, in which there are four callbacks that can be triggered when:(A) dragging UnityObject or file to enter the widget; (B) dragging UnityObject or file to exit the widget; (C) dragging UnityObject or file and release it inside the widget; (D) dragging UnityObject or file and moving inside the widget
How to Test:
You can find a test sample in the Editor main menu under
UIWidgets/EditorSample/UnityObjectDragging