Преглед на файлове

Fixes the handling of the temp editable asset definition in the asset properties inspector so it'll save sub-objects as expected

Areloch преди 1 година
родител
ревизия
8232d0f6dd
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript

+ 1 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript

@@ -77,8 +77,7 @@ function AssetBrowser::editAssetInfo(%this)
    
    %assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
    
-   eval("AssetBrowser.tempAsset = new " @ %assetDef.getClassName() @ "();");
-   AssetBrowser.tempAsset.assignFieldsFrom(%assetDef);
+   AssetBrowser.tempAsset = %assetDef.deepClone();
    
    AssetEditInspector.inspect(AssetBrowser.tempAsset);  
    AssetBrowser_editAsset.editedAssetId = EditAssetPopup.assetId;