Add support for custom drag&drop into level/prefab viewports from custom asset items

This commit is contained in:
Wojtek Figat
2021-05-24 18:34:19 +02:00
parent c78fb7995e
commit 2c7d62bb8e
13 changed files with 262 additions and 362 deletions

View File

@@ -21,6 +21,18 @@ namespace FlaxEditor.Content
{
}
/// <inheritdoc />
public override bool OnEditorDrag(object context)
{
return true;
}
/// <inheritdoc />
public override Actor OnEditorDrop(object context)
{
return PrefabManager.SpawnPrefab(FlaxEngine.Content.LoadAsync<Prefab>(ID), null);
}
/// <inheritdoc />
public override ContentItemType ItemType => ContentItemType.Asset;