Asset
Runtime asset management system.
Topics
Types
-
Represents one handle that identifies one asset entry in process scope.
-
Describes one asset type.
Enumerations
-
Identifies the asset state.
Functions
-
void register_asset_type(const AssetTypeDesc &desc)
Registers one asset type so the asset system can handle the asset of that type.
-
asset_t get_asset(const Guid &guid=Guid(0, 0))
Gets the asset handle from one asset GUID. If the asset entry with the specified GUID does not exist, this function creates one new asset entry with the specified GUID and returns the handle to the new created asset entry.
-
RV register_asset(asset_t asset, const Name &type)
Registers the specified asset.
-
R< asset_t > new_asset(const Path &path, const Name &type, bool save_meta_to_file=true)
Creates a new asset by specifying the path and type of the asset.
-
RV load_assets_meta(const Path &path, bool allow_overwrite=true)
Loads or reloads assets' metadata by reading asset metadata files.
-
RV load_asset_meta(asset_t asset)
Loads asset metadata from asset's metadata file.
-
RV save_asset_meta(asset_t asset)
Saves asset's metadata to asset's metadata file.
-
R< asset_t > get_asset_by_path(const Path &path)
Gets one asset by path.
-
Guid get_asset_guid(asset_t asset)
Gets the asset GUID.
-
Path get_asset_path(asset_t asset)
Gets the asset VFS path.
-
RV set_asset_path(asset_t asset, const Path &path)
Sets the asset VFS path.
-
Name get_asset_name(asset_t asset)
Gets the asset name, which is the filename component of the asset VFS path, excluding the extension.
-
Name get_asset_type(asset_t asset)
Gets the asset type.
-
void set_asset_type(asset_t asset, const Name &type)
Sets the asset type.
-
RV get_asset_files(asset_t asset, Vector< Name > &filenames)
Get filenames of all files associated to the specified asset.
-
RV delete_asset(asset_t asset)
Deletes one asset and all of its associated files.
-
RV move_asset(asset_t asset, const Path &new_path)
Moves all asset associated files to a new destination.
-
ObjRef get_asset_data(asset_t asset)
Gets the asset data object.
-
Ref< _Ty > get_asset_data(asset_t asset)
Gets the asset data object.
-
RV set_asset_data(asset_t asset, object_t data)
Sets the asset data object.
-
RV load_asset(asset_t asset, bool force_reload=false)
Creates one asset data object for the asset by loading data from asset file.
-
RV load_asset_default_data(asset_t asset, bool force_reload=false)
Creates one asset data object for the asset by loading default asset data.
-
AssetState get_asset_state(asset_t asset)
Gets the asset state.
-
Saves the asset data to files.
-
Closes the asset registry.