|
TorqueScript Reference
|
#include <assetBase_ScriptBinding.h>
Inherits SimObject.
Inherited by AnimationAsset, AudioAsset, FontAsset, ImageAsset, and ParticleAsset.
| Integer createStateSnapshot | ( | ) |
Takes a detached copy of everything the asset currently holds. The copy is a registered object that the caller owns and must delete. Taking one changes nothing about this asset: it is not marked as changed and nobody is notified.
| String getAssetId | ( | ) |
Gets the assets' Asset Id. This is only available if the asset was acquired from the asset manager.
| Boolean isAssetDirty | ( | ) |
Whether the asset has changes that have not been saved.
| void refreshAsset | ( | ) |
Refresh the asset. This marks the asset as having unsaved changes and tells everything watching it that it changed. It does NOT write the asset's file – use saveAsset for that.
| Boolean restoreStateSnapshot | ( | snapshot | ) |
Puts a snapshot taken by createStateSnapshot back onto this asset. The asset object itself is kept, so anything already using the asset keeps working. This does not mark the asset as changed – the caller decides what the asset's unsaved state should be afterwards.
| snapshot | The snapshot object to restore. |
| Boolean revertAsset | ( | ) |
Discard the asset's unsaved changes and reload it from its file.
| Boolean saveAsset | ( | ) |
Write the asset to its file.