浏览代码

asset browser was passing along screen position, not scene position based on drop at options

AzaezelX 1 年之前
父节点
当前提交
2a941e733e
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript

+ 4 - 4
Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript

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