mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
Added fix so if a looping sound is preview-playing in the AB and you edit the properties, it doesn't try to reload the asset while it's playing, causing a crash
Added console method for looking up a soundAsset by filename Added initial pass of project importer for sound assets content
This commit is contained in:
parent
df0f8dafa6
commit
0ca66b99db
7 changed files with 309 additions and 8 deletions
|
|
@ -42,6 +42,10 @@ function AssetBrowser::editShapeAsset(%this, %assetDef)
|
|||
ShapeEditorPlugin.openShapeAsset(%assetDef);
|
||||
}
|
||||
|
||||
function AssetBrowser::onShapeAssetChanged(%this, %assetDef)
|
||||
{
|
||||
}
|
||||
|
||||
function AssetBrowser::deleteShapeAsset(%this, %assetDef)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,12 @@ function AssetBrowser::editSoundAsset(%this, %assetDef)
|
|||
$PreviewSoundSource = %assetDef.playSound();
|
||||
}
|
||||
|
||||
function AssetBrowser::onSoundAssetChanged(%this, %assetDef)
|
||||
{
|
||||
if (isObject($PreviewSoundSource))
|
||||
sfxStop($PreviewSoundSource);
|
||||
}
|
||||
|
||||
function AssetBrowser::buildSoundAssetPreview(%this, %assetDef, %previewData)
|
||||
{
|
||||
%previewData.assetName = %assetDef.assetName;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@ function AssetBrowser_editAsset::saveAsset(%this)
|
|||
AssetBrowser.reloadAsset(%this.editedAssetId);
|
||||
|
||||
AssetBrowser.refresh();
|
||||
|
||||
%assetType = AssetDatabase.getAssetType(%this.editedAssetId);
|
||||
%assetDef = AssetDatabase.acquireAsset(%this.editedAssetId);
|
||||
AssetBrowser.call("on" @ %assetType @ "Changed", %assetDef);
|
||||
AssetDatabase.releaseAsset(%this.editedAssetId);
|
||||
|
||||
Canvas.popDialog(AssetBrowser_editAsset);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue