View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 6000.0.20 or later
- Package size
- 47 KB
- Files
- 41
- Favorites
- 9
- Views in the past week
- 7
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- Free on
Keywords
Bidirectional Files Drag and Drop
Drag out files from your Game to Windows, or vice versa - receive Drop in files from Windows to your game or application.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 1
Bidirectional Files Drag and Drop video 1
About this asset
This plugin allows you to make your Game player able to BI-DIRECTIONAL DRAG AND DROP!
- Invoke DoDragDrop and send files from your built game/app into Windows (File explorer, browser, telegram and etc).
- Subcribe for file Drop from outside (from Windows to Game)
Features
- Receive drop outside the Game/application
- Send drop outside from Game/application
- Send drop and receive drop inside same Game/application instance (UI thread will be locked, but onFilesDrop event will be invoked)
Sources used
- UnityWindowsFileDrag-Drop - Editor only drop receive-part code
- How to Implement Drag and Drop Between Your Program and Explorer - Chapter 'Initiating a drag and drop' is pretty usefull for DoDragDrop
- Gemini, MSDN - While WinAPI Vibe Coding is still too much for AI and reading MSDN is still too much for Me, combo of these two will produce something, that seems to work
From the publisher's Asset Store listing.
Technical details
Theoretically, this code can be adapted for any C# application and even more, since WinAPI calls are used here, it can be rewritten in Rust. The only thing you must have - ability to P/Invoke.
Known Issues
- Thread block when WinAPI.DoDragDrop (blocks UI). Invoking WinAPI.DoDragDrop from another thread causes OleInitialize error 0x80010106 'RPC_E_CHANGED_MODE'
- Build Crash with ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF614D811F2). Fix: Player Settings -> Other Settings -> Managed Stripping Level set to 'Disabled'
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 6000.0.20f1 | Compatible | Compatible | Compatible | Compatible |
As listed on the Asset Store.