This class is used to manage assets in the Editor. You can check if an asset with the specified GUID exists, get its file path, or subscribe for signals to perform certain actions when an asset is added, moved, updated, or deleted.
More...
#include <AssetManager.h>
|
void | added (const Unigine::UGUID &guid) |
| This signal is emitted when a new asset is added, with the asset's GUID as an argument. More...
|
|
void | removed (const Unigine::UGUID &guid) |
| This signal is emitted when an asset is deleted, with the asset's GUID as an argument. More...
|
|
void | changed (const Unigine::UGUID &guid) |
| This signal is emitted when an asset is modified, with the asset's GUID as an argument. More...
|
|
void | moved (const Unigine::UGUID &guid) |
| This signal is emitted when an asset is moved to another location, with the asset's GUID as an argument. More...
|
|
|
static AssetManager * | instance () |
| Returns the instance of the AssetManager class. This method is used to subscribe to signals. More...
|
|
static bool | hasAsset (const Unigine::UGUID &guid) |
| Returns a value indicating whether an asset with the specified GUID exists. More...
|
|
static bool | hasAsset (const char *s_filepath) |
| Returns a value indicating whether an asset with the specified file path exists. More...
|
|
static Unigine::Vector< Unigine::UGUID > | assets () |
| Returns the list of GUIDs for all existing assets. More...
|
|
static Unigine::Vector< Unigine::UGUID > | assets (const char *dirpath) |
| Returns the list of GUIDs for all assets existing in the specified directory. More...
|
|
static Unigine::String | assetFilePath (const Unigine::UGUID &guid) |
| Returns the path to the asset file by its GUID. More...
|
|
This class is used to manage assets in the Editor. You can check if an asset with the specified GUID exists, get its file path, or subscribe for signals to perform certain actions when an asset is added, moved, updated, or deleted.
◆ added
void Editor::AssetManager::added |
( |
const Unigine::UGUID & |
guid | ) |
|
|
signal |
This signal is emitted when a new asset is added, with the asset's GUID as an argument.
◆ assetFilePath()
static Unigine::String Editor::AssetManager::assetFilePath |
( |
const Unigine::UGUID & |
guid | ) |
|
|
static |
Returns the path to the asset file by its GUID.
- Parameters
-
guid | GUID of the asset to find the path for. |
◆ assets() [1/2]
static Unigine::Vector<Unigine::UGUID> Editor::AssetManager::assets |
( |
| ) |
|
|
static |
Returns the list of GUIDs for all existing assets.
◆ assets() [2/2]
static Unigine::Vector<Unigine::UGUID> Editor::AssetManager::assets |
( |
const char * |
dirpath | ) |
|
|
static |
Returns the list of GUIDs for all assets existing in the specified directory.
- Parameters
-
dirpath | Path to a directory containing assets. |
◆ changed
void Editor::AssetManager::changed |
( |
const Unigine::UGUID & |
guid | ) |
|
|
signal |
This signal is emitted when an asset is modified, with the asset's GUID as an argument.
◆ hasAsset() [1/2]
static bool Editor::AssetManager::hasAsset |
( |
const Unigine::UGUID & |
guid | ) |
|
|
static |
Returns a value indicating whether an asset with the specified GUID exists.
- Parameters
-
guid | GUID of the asset to be checked. |
◆ hasAsset() [2/2]
static bool Editor::AssetManager::hasAsset |
( |
const char * |
s_filepath | ) |
|
|
static |
Returns a value indicating whether an asset with the specified file path exists.
- Parameters
-
s_filepath | Path of the asset to be checked. |
◆ instance()
Returns the instance of the AssetManager class. This method is used to subscribe to signals.
- Returns
- AssetManager class instance.
Example:
, this, &SomeClass::asset_changed);
◆ moved
void Editor::AssetManager::moved |
( |
const Unigine::UGUID & |
guid | ) |
|
|
signal |
This signal is emitted when an asset is moved to another location, with the asset's GUID as an argument.
◆ removed
void Editor::AssetManager::removed |
( |
const Unigine::UGUID & |
guid | ) |
|
|
signal |
This signal is emitted when an asset is deleted, with the asset's GUID as an argument.
◆ Editor::Application
friend class Editor::Application |
|
friend |