Drag and drop an external file/folder into a running game window?

Hi all,

Is there any way I can drag and drop an external file or folder into a running Unity game window, and at least be able to determine the file path?

I am basically wanting to create a model viewer and would be very handy to do this, but having trouble finding information on whether this is possible or not.

thanks,

Allan

I’m not sure about drag and drop but it is quite possible to get the path of any asset or load an asset from an external source.

var path = EditorUtility.OpenFilePanel("Load RTF note file", "", "");

I use this to load notes into Unity.

There is also the whole AssetDatabase thing to check out.

AssetDatabase.GetAssetPath

Bunny83 has made some code that can do this. It’s really simple to use.
https://github.com/Bunny83/UnityWindowsFileDrag-Drop