A month ago, ViewportDragDropped, ViewportDragEntered, and ViewportDragLeft were added to the API, but they are locked behind RobloxScriptSecurity and cannot be used by user plugins.
If Roblox is able to address this issue, it would improve my development experience because I could implement simple features for my plugins involving dragging into the viewport.
I dug into a 2019 Toolbox’s code to see how they detect the viewport asset drag and drop thing, but apparently that’s hardcoded:
local success, errorMessage = pcall(function()
-- Mark the toolbox as using the C++ drag handler implementation
-- That will insert the given asset and drag it in the 3d view
options.plugin.UsesAssetInsertionDrag = true
-- TODO CLIDEVSRVS-1246: This should use uri list or something
local url = Urls.constructAssetGameAssetIdUrl(
assetId,
options.assetTypeId,
Category.categoryIsPackage(options.categoryIndex)
)
if DebugFlags.shouldDebugUrls() then
print(("Dragging asset url %s"):format(url))
end
options.plugin:StartDrag({
Sender = "LuaToolbox",
MimeType = "text/plain",
Data = url,
})
end)