MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / saveAsset

Method saveAsset

Engine/source/assets/assetBase.cpp:377–395  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

375
376//-----------------------------------------------------------------------------
377bool AssetBase::saveAsset()
378{
379 // Set the format mode.
380 Taml taml;
381
382 // Yes, so set it.
383 taml.setFormatMode(Taml::getFormatModeEnum("xml"));
384
385 // Turn-off auto-formatting.
386 taml.setAutoFormat(false);
387
388 // Read object.
389 bool success = taml.write(this, AssetDatabase.getAssetFilePath(getAssetId()));
390
391 if (!success)
392 return false;
393
394 return true;
395}
396
397//-----------------------------------------------------------------------------
398

Callers 1

Calls 4

setFormatModeMethod · 0.80
setAutoFormatMethod · 0.80
getAssetFilePathMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected