Editor API
UnigineEditor public API
|
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. AssetManager extends the functionality of UNIGINE's File System, being based on it. It performs operations itself while controlling the File System. Paths and GUIDs used for Unigine::FileSystem can be used for UnigineEditor::AssetManager as well. All paths returned by the AssetManager (via getAssetPaths, getDirectoryPaths, etc.) are virtual. More...
#include <UnigineAssetManager.h>
Static Public Member Functions | |
static int | isInitialized () |
Returns a value indicating if Asset Manager is initialized. More... | |
static Unigine::UGUID | getAssetGUIDFromPath (const char *asset_path) |
Returns asset GUID for the specified asset path. This GUID can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class. More... | |
static Unigine::String | getAssetPathFromGUID (const Unigine::UGUID &asset_guid) |
Returns asset path for the specified asset GUID. More... | |
static bool | importAssetSync (const char *asset_path, const Unigine::Ptr< Collection > &import_parameters={}) |
Imports the specified asset with the specified set of import settings synchronously. The function call will not return until the blocking operation is complete, unlike the importAssetAsync() method. More... | |
static bool | importAssetAsync (const char *asset_path, const Unigine::Ptr< Collection > &import_parameters={}) |
Imports the specified asset with the specified set of import settings asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the importAssetSync() method. More... | |
static bool | reimportAssetSync (const char *asset_path, const Unigine::Ptr< Collection > &import_parameters={}) |
Reimports the specified asset with the specified set of import settings synchronously. The function call will not return until the blocking operation is complete, unlike the reimportAssetAsync() method. More... | |
static bool | reimportAssetAsync (const char *asset_path, const Unigine::Ptr< Collection > &import_parameters={}) |
Reimports the specified asset with the specified set of import settings asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the reimportAssetSync() method. More... | |
static bool | removeAssetSync (const char *asset_path) |
Removes the specified asset synchronously. The function call will not return until the blocking operation is complete, unlike the removeAssetAsync() method. More... | |
static bool | removeAssetAsync (const char *asset_path) |
Removes the specified asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the removeAssetSync() method. More... | |
static bool | moveAssetSync (const char *old_asset_path, const char *new_asset_path) |
Moves the specified asset to a new location synchronously. The function call will not return until the blocking operation is complete, unlike the moveAssetAsync() method. More... | |
static bool | moveAssetAsync (const char *old_asset_path, const char *new_asset_path) |
Moves the specified asset to a new location asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the moveAssetSync() method. More... | |
static bool | renameAssetSync (const char *asset_path, const char *new_asset_name) |
Renames the specified asset synchronously. The function call will not return until the blocking operation is complete, unlike the renameAssetAsync() method. More... | |
static bool | renameAssetAsync (const char *asset_path, const char *new_asset_name) |
Renames the specified asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the renameAssetSync() method. More... | |
static bool | copyAssetSync (const char *asset_path, const char *new_asset_path) |
Copies the specified asset to the specified destination path synchronously. The function call will not return until the blocking operation is complete, unlike the copyAssetAsync() method. More... | |
static bool | copyAssetAsync (const char *asset_path, const char *new_asset_path) |
Copies the specified asset to the specified destination path asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the copyAssetSync() method. More... | |
static bool | isAsset (const char *asset_path) |
Returns a value indicating whether an asset with the specified file path exists. More... | |
static Unigine::Ptr< Collection > | getAssetImportParameters (const char *asset_path) |
Returns the set of import parameters for the specified asset path. More... | |
static bool | isAssetWritable (const char *asset_path) |
Returns a value indicating whether the asset with the specified file path can be updated (writing operation is enabled for it). More... | |
static Unigine::Vector< Unigine::UGUID > | getAssetGUIDs () |
Returns the list of GUIDs for all assets in the root project directory (excluding contents of subdirectories). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class. More... | |
static Unigine::Vector< Unigine::String > | getAssetPaths () |
Returns the list of paths for all assets in the root project directory (excluding contents of subdirectories). More... | |
static Unigine::Vector< Unigine::UGUID > | getAssetGUIDsForDirectory (const char *directory_path) |
Returns the list of GUIDs for all assets in the specified directory (excluding contents of subdirectories). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class. More... | |
static Unigine::Vector< Unigine::String > | getAssetPathsForDirectory (const char *directory_path) |
Returns the list of paths for all assets in the specified directory (excluding contents of subdirectories). More... | |
static Unigine::Vector< Unigine::UGUID > | getRuntimeGUIDs (const char *asset_path) |
Returns the list of all runtime GUIDs for the specified asset path (some assets, like FBX-containers may produce multiple runtimes on importing). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class. More... | |
static Unigine::String | getRuntimeAlias (const Unigine::UGUID &runtime_guid) |
Returns an alias used for the runtime with the specified GUID. More... | |
static bool | isRuntimePrimary (const Unigine::UGUID &runtime_guid) |
Returns a value indicating whether the runtime with the specified GUID is a primary one. More... | |
static bool | createDirectory (const char *directory_path) |
Creates a new directory. The function will create all parent directories necessary to create the directory specified. More... | |
static bool | removeDirectorySync (const char *directory_path) |
Removes the specified directory synchronously. The function call will not return until the blocking operation is complete, unlike the removeDirectoryAsync() method. More... | |
static bool | removeDirectoryAsync (const char *directory_path) |
Removes the specified directory asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the removeDirectorySync() method. More... | |
static bool | moveDirectorySync (const char *old_directory_path, const char *new_directory_path) |
Moves the specified directory to a new location synchronously. The function call will not return until the blocking operation is complete, unlike the moveDirectoryAsync() method. More... | |
static bool | moveDirectoryAsync (const char *old_directory_path, const char *new_directory_path) |
Moves the specified directory to a new location asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the moveDirectorySync() method. More... | |
static bool | renameDirectorySync (const char *directory_path, const char *new_directory_name) |
Renames the specified directory synchronously. The function call will not return until the blocking operation is complete, unlike the renameDirectoryAsync() method. More... | |
static bool | renameDirectoryAsync (const char *directory_path, const char *new_directory_name) |
Renames the specified directory asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the renameDirectorySync() method. More... | |
static bool | copyDirectorySync (const char *directory_path, const char *new_directory_path) |
Copies the specified directory to the specified destination path synchronously. The function call will not return until the blocking operation is complete, unlike the copyDirectoryAsync() method. More... | |
static bool | copyDirectoryAsync (const char *directory_path, const char *new_directory_path) |
Copies the specified directory to the specified destination path asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the copyDirectorySync() method. More... | |
static bool | isDirectory (const char *directory_path) |
Returns a value indicating whether the specified directory path exists. More... | |
static bool | isDirectoryWritable (const char *directory_path) |
Returns a value indicating whether the specified directory path is writable. More... | |
static Unigine::Vector< Unigine::String > | getDirectoryPathsAll () |
Returns the list of all subdirectories for the root project directory. More... | |
static Unigine::Vector< Unigine::String > | getDirectoryPaths (const char *directory_path) |
Returns the list of all subdirectories for the specified directory path. More... | |
static bool | createMountPoint (const char *directory_path, const Unigine::Ptr< MountPointParameters > &mount_creation_parameters) |
Creates a new mount point for the specified path applying the specified parameters (access mode, filters, etc.) and the corresponding .umount file. More... | |
static bool | removeMountPoint (const char *directory_path) |
Unmounts the mount point for the specified path and deletes the corresponding .umount file. More... | |
static bool | isMountPoint (const char *directory_path) |
Returns a value indicating whether a mount point with the specified path exists. More... | |
static Unigine::Ptr< MountPointParameters > | getMountPointParameters (const char *directory_path) |
Returns the parameters for the specified mount point (access mode, filters, etc.) as an instance of the MountPointParameters class). More... | |
static bool | refreshMountPointAsync (const char *directory_path) |
Reloads the data and updates the mount point with the specified path asynchronously. After calling this method the operation is put to a queue. More... | |
static void | blockAutoRefresh () |
Increments an internal counter which is used to determine whether to allow automatic refreshing of the assets database (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use this method together with unblockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). This method does not simply enable the auto-refresh feature. Instead, it increments a counter, and only allows auto-refresh when the counter reaches zero. Therefore, each time you call blockAutoRefresh(), you must make sure you also make a corresponding call to unblockAutoRefresh(). This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero. More... | |
static void | unblockAutoRefresh () |
Decrements an internal counter which is used to determine whether to allow automatic refreshing of the assets database (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use this method together with blockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). This method does not simply enable the auto-refresh feature. Instead, it decrements a counter, and only allows auto-refresh when the counter reaches zero. It is designed to be used to re-enable auto-refresh after a call to blockAutoRefresh() previously disabled it. This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero. More... | |
static bool | isAutoRefreshBlocked () |
Returns a value indicating whether automatic refreshing of the assets database is currently blocked or not (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use blockAutoRefresh() together with unblockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). The system does not simply enable/disable the auto-refresh feature. Instead, it increments (see unblockAutoRefresh) and decrements (see blockAutoRefresh) a counter, and only allows auto-refresh when the counter reaches zero. This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero. More... | |
static void * | addAssetAddedCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called when a new asset is added. The signature of the callback function must be as follows: void callback_function_name(const char *asset_path); More... | |
static bool | removeAssetAddedCallback (void *id) |
Removes the specified callback from the list of AssetAdded callbacks. These callbacks are fired when a new asset is added. More... | |
static void * | addAssetBeforeRemoveCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called before deleting an asset. Please note, that the asset file may already be deleted at the moment of callback execution (e.g. deleted by user manually via a file manager). The signature of the callback function must be as follows: void callback_function_name(const char *asset_path); More... | |
static bool | removeAssetBeforeRemoveCallback (void *id) |
Removes the specified callback from the list of AssetBeforeRemove callbacks. These callbacks are fired when an asset is about to be deleted. More... | |
static void * | addAssetRemovedCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called when an asset is deleted. The signature of the callback function must be as follows: void callback_function_name(const char *asset_path); More... | |
static bool | removeAssetRemovedCallback (void *id) |
Removes the specified callback from the list of AssetRemoved callbacks. These callbacks are fired when an asset is deleted. More... | |
static void * | addAssetChangedCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called when an asset is modified or its import parameters have changed (reimport). The signature of the callback function must be as follows: void callback_function_name(const char *asset_path); More... | |
static bool | removeAssetChangedCallback (void *id) |
Removes the specified callback from the list of AssetChanged callbacks. These callbacks are fired when an asset is modified or its import parameters have changed (reimport). More... | |
static void * | addAssetMovedCallback (Unigine::CallbackBase2< const char *, const char * > *func) |
Adds a callback function to be called when an asset is moved to another directory or renamed. The signature of the callback function must be as follows: void callback_function_name(const char *path_from, const char *path_to); More... | |
static bool | removeAssetMovedCallback (void *id) |
Removes the specified callback from the list of AssetMoved callbacks. These callbacks are fired when an asset is moved to another directory or renamed. More... | |
static void * | addDirectoryAddedCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called when a new directory is added. The signature of the callback function must be as follows: void callback_function_name(const char *directory_path); More... | |
static bool | removeDirectoryAddedCallback (void *id) |
Removes the specified callback from the list of DirectoryAdded callbacks. These callbacks are fired when a new directory is added. More... | |
static void * | addDirectoryBeforeRemoveCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called before deleting a directory. Please note, that the directory may already be deleted at the moment of callback execution (e.g. deleted by user manually via a file manager). The signature of the callback function must be as follows: void callback_function_name(const char *directory_path); More... | |
static bool | removeDirectoryBeforeRemoveCallback (void *id) |
Removes the specified callback from the list of DirectoryBeforeRemove callbacks. These callbacks are fired when a directory is about to be deleted. More... | |
static void * | addDirectoryRemovedCallback (Unigine::CallbackBase1< const char * > *func) |
Adds a callback function to be called when a directory is deleted. The signature of the callback function must be as follows: void callback_function_name(const char *directory_path); More... | |
static bool | removeDirectoryRemovedCallback (void *id) |
Removes the specified callback from the list of DirectoryRemoved callbacks. These callbacks are fired when a directory is deleted. More... | |
static void * | addDirectoryMovedCallback (Unigine::CallbackBase2< const char *, const char * > *func) |
Adds a callback function to be called when a directory is moved to another location or renamed. The signature of the callback function must be as follows: void callback_function_name(const char *path_from, const char *path_to); More... | |
static bool | removeDirectoryMovedCallback (void *id) |
Removes the specified callback from the list of DirectoryMoved callbacks. These callbacks are fired when a directory is moved to another location or renamed. More... | |
static void * | addProcessBeginCallback (Unigine::CallbackBase *func) |
Adds a callback function to be called when Asset Manager begins asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.). The signature of the callback function must be as follows: void callback_function_name(); More... | |
static bool | removeProcessBeginCallback (void *id) |
Removes the specified callback from the list of ProcessBegin callbacks. These callbacks are fired when Asset Manager begins asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.). More... | |
static void * | addProcessEndCallback (Unigine::CallbackBase *func) |
Adds a callback function to be called when asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.) by the Asset Manager is completed. The signature of the callback function must be as follows: void callback_function_name(); More... | |
static bool | removeProcessEndCallback (void *id) |
Removes the specified callback from the list of ProcessEnd callbacks. These callbacks are fired on completion of asynchronous asset processing by the Asset Manager (e.g., validation, import, reimport, removal, copying, conversion, migration etc.). More... | |
static Unigine::String | generateUniquePath (const char *path) |
Generates a unique path which is not currently used in the File System for the specified path. Unique paths for files having an extension shall be generated without affecting the extension: folder/file.png -> folder/file_0.png. More... | |
static bool | isExist (const char *path) |
Checks if the specified path exists, either it is registered in the Asset System (it is an asset, a folder, or a mount point), or it is an existing file in the File System which is not added to Asset System for some reason (e.g., its name or extension is forbidden or filtered out by exclusive or ignore filters). 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. AssetManager extends the functionality of UNIGINE's File System, being based on it. It performs operations itself while controlling the File System. Paths and GUIDs used for Unigine::FileSystem can be used for UnigineEditor::AssetManager as well. All paths returned by the AssetManager (via getAssetPaths, getDirectoryPaths, etc.) are virtual.
|
static |
Adds a callback function to be called when a new asset is added. The signature of the callback function must be as follows:
void callback_function_name(const char *asset_path);
func | Callback function to be fired on adding a new asset. |
|
static |
Adds a callback function to be called before deleting an asset. Please note, that the asset file may already be deleted at the moment of callback execution (e.g. deleted by user manually via a file manager). The signature of the callback function must be as follows:
void callback_function_name(const char *asset_path);
func | Callback function to be fired when an asset is about to be deleted. |
|
static |
Adds a callback function to be called when an asset is modified or its import parameters have changed (reimport). The signature of the callback function must be as follows:
void callback_function_name(const char *asset_path);
func | Callback function to be fired on changing an asset or its import parameters (reimport). |
|
static |
Adds a callback function to be called when an asset is moved to another directory or renamed. The signature of the callback function must be as follows:
void callback_function_name(const char *path_from, const char *path_to);
func | Callback function to be fired on moving an asset to another directory or renamint it. |
|
static |
Adds a callback function to be called when an asset is deleted. The signature of the callback function must be as follows:
void callback_function_name(const char *asset_path);
func | Callback function to be fired on deleting an asset. |
|
static |
Adds a callback function to be called when a new directory is added. The signature of the callback function must be as follows:
void callback_function_name(const char *directory_path);
func | Callback function to be fired on adding a new directory. |
|
static |
Adds a callback function to be called before deleting a directory. Please note, that the directory may already be deleted at the moment of callback execution (e.g. deleted by user manually via a file manager). The signature of the callback function must be as follows:
void callback_function_name(const char *directory_path);
func | Callback function to be fired when a directory is about to be deleted. |
|
static |
Adds a callback function to be called when a directory is moved to another location or renamed. The signature of the callback function must be as follows:
void callback_function_name(const char *path_from, const char *path_to);
func | Callback function to be fired on moving a directory to another location or renaming it. |
|
static |
Adds a callback function to be called when a directory is deleted. The signature of the callback function must be as follows:
void callback_function_name(const char *directory_path);
func | Callback function to be fired on deleting a directory. |
|
static |
Adds a callback function to be called when Asset Manager begins asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.). The signature of the callback function must be as follows:
void callback_function_name();
func | Callback function to be fired when Asset Manager begins asynchronous asset processing. |
|
static |
Adds a callback function to be called when asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.) by the Asset Manager is completed. The signature of the callback function must be as follows:
void callback_function_name();
func | Callback function to be fired on completion of asynchronous asset processing by the Asset Manager. |
|
static |
Increments an internal counter which is used to determine whether to allow automatic refreshing of the assets database (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use this method together with unblockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). This method does not simply enable the auto-refresh feature. Instead, it increments a counter, and only allows auto-refresh when the counter reaches zero. Therefore, each time you call blockAutoRefresh(), you must make sure you also make a corresponding call to unblockAutoRefresh(). This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero.
|
static |
Copies the specified asset to the specified destination path asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the copyAssetSync() method.
asset_path | Path to the asset to be copied. |
new_asset_path | Destination path to which the asset is to be copied. |
|
static |
Copies the specified asset to the specified destination path synchronously. The function call will not return until the blocking operation is complete, unlike the copyAssetAsync() method.
asset_path | Path to the asset to be copied. |
new_asset_path | Destination path to which the asset is to be copied. |
|
static |
Copies the specified directory to the specified destination path asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the copyDirectorySync() method.
directory_path | Path to the directory to be copied. |
new_directory_path | New directory name. |
|
static |
Copies the specified directory to the specified destination path synchronously. The function call will not return until the blocking operation is complete, unlike the copyDirectoryAsync() method.
directory_path | Path to the directory to be copied. |
new_directory_path | Destination path to which the directory is to be copied. |
|
static |
Creates a new directory. The function will create all parent directories necessary to create the directory specified.
directory_path | New directory path to be created. |
|
static |
Creates a new mount point for the specified path applying the specified parameters (access mode, filters, etc.) and the corresponding .umount file.
directory_path | Path to the directory to be mounted. |
mount_creation_parameters | Parameters of the mount point to be created (access mode, filters, etc.). |
|
static |
Generates a unique path which is not currently used in the File System for the specified path. Unique paths for files having an extension shall be generated without affecting the extension: folder/file.png -> folder/file_0.png.
|
static |
Returns asset GUID for the specified asset path. This GUID can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
asset_path | Path to the asset to retrieve a GUID for. |
|
static |
Returns the list of GUIDs for all assets in the root project directory (excluding contents of subdirectories). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
|
static |
Returns the list of GUIDs for all assets in the specified directory (excluding contents of subdirectories). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
directory_path | Directory path for which all asset GUIDs are to be retrieved. |
|
static |
Returns the set of import parameters for the specified asset path.
asset_path | Path of the asset to be checked. |
|
static |
Returns asset path for the specified asset GUID.
asset_guid | GUID of the asset to retrieve a path for. |
|
static |
Returns the list of paths for all assets in the root project directory (excluding contents of subdirectories).
|
static |
Returns the list of paths for all assets in the specified directory (excluding contents of subdirectories).
directory_path | Directory path for which all asset paths are to be retrieved. |
|
static |
Returns the list of all subdirectories for the specified directory path.
directory_path | Directory path. |
|
static |
Returns the list of all subdirectories for the root project directory.
|
static |
Returns the parameters for the specified mount point (access mode, filters, etc.) as an instance of the MountPointParameters class).
directory_path | Path to the mounted directory. |
|
static |
Returns an alias used for the runtime with the specified GUID.
runtime_guid | Runtime GUID for which the alias is to be retrieved. |
|
static |
Returns the list of all runtime GUIDs for the specified asset path (some assets, like FBX-containers may produce multiple runtimes on importing). Thess GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
asset_path | Asset path for which the list of runtime GUIDs is to be retrieved. |
|
static |
Imports the specified asset with the specified set of import settings asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the importAssetSync() method.
asset_path | Path to the asset to be imported. This asset-file MUST be inside the data_path (or inside a registered mount point, which is actually the same). |
import_parameters | Set of import parameters for the asset. |
|
static |
Imports the specified asset with the specified set of import settings synchronously. The function call will not return until the blocking operation is complete, unlike the importAssetAsync() method.
asset_path | Path to the asset to be imported. This asset-file MUST be inside the data_path (or inside a registered mount point, which is actually the same). |
import_parameters | Set of import parameters for the asset. |
|
static |
Returns a value indicating whether an asset with the specified file path exists.
asset_path | Path of the asset to be checked. |
|
static |
Returns a value indicating whether the asset with the specified file path can be updated (writing operation is enabled for it).
asset_path | Asset path to be checked. |
|
static |
Returns a value indicating whether automatic refreshing of the assets database is currently blocked or not (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use blockAutoRefresh() together with unblockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). The system does not simply enable/disable the auto-refresh feature. Instead, it increments (see unblockAutoRefresh) and decrements (see blockAutoRefresh) a counter, and only allows auto-refresh when the counter reaches zero. This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero.
|
static |
Returns a value indicating whether the specified directory path exists.
directory_path | Directory path to be checked. |
|
static |
Returns a value indicating whether the specified directory path is writable.
directory_path | Directory path to be checked. |
|
static |
Checks if the specified path exists, either it is registered in the Asset System (it is an asset, a folder, or a mount point), or it is an existing file in the File System which is not added to Asset System for some reason (e.g., its name or extension is forbidden or filtered out by exclusive or ignore filters).
|
static |
Returns a value indicating if Asset Manager is initialized.
|
static |
Returns a value indicating whether a mount point with the specified path exists.
directory_path | Directory path to be checked. |
|
static |
Returns a value indicating whether the runtime with the specified GUID is a primary one.
runtime_guid | Runtime GUID to be checked. |
|
static |
Moves the specified asset to a new location asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the moveAssetSync() method.
old_asset_path | Old asset path (FROM which the asset is moved). |
new_asset_path | New asset path (TO which the asset is moved). |
|
static |
Moves the specified asset to a new location synchronously. The function call will not return until the blocking operation is complete, unlike the moveAssetAsync() method.
old_asset_path | Old asset path (FROM which the asset is moved). |
new_asset_path | New asset path (TO which the asset is moved). |
|
static |
Moves the specified directory to a new location asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the moveDirectorySync() method.
old_directory_path | Old directory path (FROM which the directory is moved). |
new_directory_path | New directory path (TO which the directory is moved). |
|
static |
Moves the specified directory to a new location synchronously. The function call will not return until the blocking operation is complete, unlike the moveDirectoryAsync() method.
old_directory_path | Old directory path (FROM which the directory is moved). |
new_directory_path | New directory path (TO which the directory is moved). |
|
static |
Reloads the data and updates the mount point with the specified path asynchronously. After calling this method the operation is put to a queue.
directory_path | Directory path for the mount point to be refreshed. |
|
static |
Reimports the specified asset with the specified set of import settings asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the reimportAssetSync() method.
asset_path | Path to the asset to be reimported. |
import_parameters | Set of import parameters for the asset. |
|
static |
Reimports the specified asset with the specified set of import settings synchronously. The function call will not return until the blocking operation is complete, unlike the reimportAssetAsync() method.
asset_path | Path to the asset to be reimported. |
import_parameters | Set of import parameters for the asset. |
|
static |
Removes the specified callback from the list of AssetAdded callbacks. These callbacks are fired when a new asset is added.
id | Callback ID obtained when adding it via a call to addAssetAddedCallback(). |
|
static |
Removes the specified asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the removeAssetSync() method.
asset_path | Path to the asset to be removed. |
|
static |
Removes the specified callback from the list of AssetBeforeRemove callbacks. These callbacks are fired when an asset is about to be deleted.
id | Callback ID obtained when adding it via a call to addAssetBeforeRemoveCallback(). |
|
static |
Removes the specified callback from the list of AssetChanged callbacks. These callbacks are fired when an asset is modified or its import parameters have changed (reimport).
id | Callback ID obtained when adding it via a call to addAssetChangedCallback(). |
|
static |
Removes the specified callback from the list of AssetMoved callbacks. These callbacks are fired when an asset is moved to another directory or renamed.
id | Callback ID obtained when adding it via a call to addAssetMovedCallback(). |
|
static |
Removes the specified callback from the list of AssetRemoved callbacks. These callbacks are fired when an asset is deleted.
id | Callback ID obtained when adding it via a call to addAssetRemovedCallback(). |
|
static |
Removes the specified asset synchronously. The function call will not return until the blocking operation is complete, unlike the removeAssetAsync() method.
asset_path | Path to the asset to be removed. |
|
static |
Removes the specified callback from the list of DirectoryAdded callbacks. These callbacks are fired when a new directory is added.
id | Callback ID obtained when adding it via a call to addDirectoryAddedCallback(). |
|
static |
Removes the specified directory asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the removeDirectorySync() method.
directory_path | Directory path to be removed. |
|
static |
Removes the specified callback from the list of DirectoryBeforeRemove callbacks. These callbacks are fired when a directory is about to be deleted.
id | Callback ID obtained when adding it via a call to addDirectoryBeforeRemoveCallback(). |
|
static |
Removes the specified callback from the list of DirectoryMoved callbacks. These callbacks are fired when a directory is moved to another location or renamed.
id | Callback ID obtained when adding it via a call to addDirectoryMovedCallback(). |
|
static |
Removes the specified callback from the list of DirectoryRemoved callbacks. These callbacks are fired when a directory is deleted.
id | Callback ID obtained when adding it via a call to addDirectoryRemovedCallback(). |
|
static |
Removes the specified directory synchronously. The function call will not return until the blocking operation is complete, unlike the removeDirectoryAsync() method.
directory_path | Directory path to be removed. |
|
static |
Unmounts the mount point for the specified path and deletes the corresponding .umount file.
directory_path | Mount path to be removed. |
|
static |
Removes the specified callback from the list of ProcessBegin callbacks. These callbacks are fired when Asset Manager begins asynchronous asset processing (e.g., validation, import, reimport, removal, copying, conversion, migration etc.).
id | Callback ID obtained when adding it via a call to addProcessBeginCallback(). |
|
static |
Removes the specified callback from the list of ProcessEnd callbacks. These callbacks are fired on completion of asynchronous asset processing by the Asset Manager (e.g., validation, import, reimport, removal, copying, conversion, migration etc.).
id | Callback ID obtained when adding it via a call to addProcessEndCallback(). |
|
static |
Renames the specified asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the renameAssetSync() method.
asset_path | Path to the asset to be renamed. |
new_asset_name | New asset name. |
|
static |
Renames the specified asset synchronously. The function call will not return until the blocking operation is complete, unlike the renameAssetAsync() method.
asset_path | Path to the asset to be renamed. |
new_asset_name | New asset name. |
|
static |
Renames the specified directory asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put to a queue, unlike the renameDirectorySync() method.
directory_path | Path to the directory to be renamed. |
new_directory_name | New directory name. |
|
static |
Renames the specified directory synchronously. The function call will not return until the blocking operation is complete, unlike the renameDirectoryAsync() method.
directory_path | Path to the directory to be renamed. |
new_directory_name | New directory name. |
|
static |
Decrements an internal counter which is used to determine whether to allow automatic refreshing of the assets database (i.e. automatic reimporting of changed assets). When building your own Editor tools, you can use this method together with blockAutoRefresh() to prevent an auto-refreshing from happening during certain operations (e.g. if you are building a custom integration with a version control system). This method does not simply enable the auto-refresh feature. Instead, it decrements a counter, and only allows auto-refresh when the counter reaches zero. It is designed to be used to re-enable auto-refresh after a call to blockAutoRefresh() previously disabled it. This internal counter is used so that if your code executes multiple nested "block" and "unblock" pairs, the inner pairs do not accidentally re-enable auto-refresh too early. Instead, each pair increments and decrements the counter by one, and if your code is correctly nested, the final outer call to unblockAutoRefresh sets the counter to zero.