Does OS-Native Drag And Drop work in Unity 2020?

Hi,

Easy question.

I want to be able to accept files if the user drags them onto my game’s window, at runtime. Is there a way to do that in 2020?

Thank you,
-Chilton

The drag and drop behaviors are platform dependent and there is no implementation of this in UItoolkit.

You will have to do the detection of the drag and drop implementation for your target platform first and then change the Ui based on the drag events.

One such example of managing the native part: GitHub - Bunny83/UnityWindowsFileDrag-Drop: Adds file drag and drop support for Unity standalong builds on windows.

I hope this will get you started.

1 Like

Thank you, that is perfect! All I needed was a foot in the door :slight_smile:

-Chilton

1 Like