Merge pull request #1253 from Azaezel/alpha41/abDragDropDrunk

asset browser was passing along screen position, not scene position based on drop at options
This commit is contained in:
Brian Roberts 2024-04-15 01:35:11 -05:00 committed by GitHub
commit d41530f61e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2535,20 +2535,20 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
{
if(%assetType $= "Datablock")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %asset @ ",\"" @ %position @ "\");";
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %asset @ ",\"" @ %pos @ "\");";
}
else if(%assetType $= "Prefab")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(\"" @ %module @ "/" @ %asset @ "\",\"" @ %position @ "\");";
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(\"" @ %module @ "/" @ %asset @ "\",\"" @ %pos @ "\");";
}
else if(%assetType $= "Creator")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %module @ ",\"" @ %position @ "\");";
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %module @ ",\"" @ %pos @ "\");";
}
else
{
%assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %asset);
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %assetDef @ ",\"" @ %position @ "\");";
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %assetDef @ ",\"" @ %pos @ "\");";
}
eval(%buildCommand);