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...
Static Public Member Functions | |
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 in 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 in 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 in 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 in 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 in 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 in 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 (including all subdirectories). These 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 void | getAssetGUIDs (Unigine::Vector< Unigine::UGUID > &asset_guids) |
Saves to the vector specified as the argument GUIDs for all assets in the root project directory (including all subdirectories). These 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 (including all subdirectories). More... | |
static void | getAssetPaths (Unigine::Vector< Unigine::String > &asset_paths) |
Saves to the vector specified as the argument the list of paths for all assets in the root project directory (including all subdirectories). More... | |
static Unigine::Vector< Unigine::UGUID > | getAssetGUIDsForDirectory (const char *directory_path) |
Returns the list of GUIDs for all assets in the specified directory (including all 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 void | getAssetGUIDsForDirectory (const char *directory_path, Unigine::Vector< Unigine::UGUID > &asset_guids) |
Saves to the vector specified as the argument the list of GUIDs for all assets in the specified directory (including all 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 (including all subdirectories). More... | |
static void | getAssetPathsForDirectory (const char *directory_path, Unigine::Vector< Unigine::String > &asset_paths) |
Saves to the vector specified as the argument the list of paths for all assets in the specified directory (including all 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 void | getRuntimeGUIDs (const char *asset_path, Unigine::Vector< Unigine::UGUID > &runtime_guids) |
Saves to the vector specified as the argument 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 in 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 in 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 in 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 in 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 void | getDirectoryPathsAll (Unigine::Vector< Unigine::String > &directory_paths) |
Saves to the vector specified as the argument 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 void | getDirectoryPaths (const char *directory_path, Unigine::Vector< Unigine::String > &directory_paths) |
Saves to the vector specified as the argument 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 in 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 Unigine::Event< const char * > & | getEventAssetAdded () |
This event may be called upon either of the following occurs: More... | |
static Unigine::Event< const char * > & | getEventAssetBeforeRemove () |
While this event is called, the information on the asset being deleted (such as 'getAssetImportParameters()') is still accessible via the AssetManager API. More... | |
static Unigine::Event< const char * > & | getEventAssetRemoved () |
The event is called when the asset is removed. More... | |
static Unigine::Event< const char * > & | getEventAssetChanged () |
The event is called when the asset has been changed OR the parameters of the meta have been changed, which caused the asset reimport and/or the meta file update. More... | |
static Unigine::Event< const char *, const char * > & | getEventAssetMoved () |
The event is called when the asset has been moved or renamed. More... | |
static Unigine::Event< const char * > & | getEventDirectoryAdded () |
The event is called when a new directory has been added. More... | |
static Unigine::Event< const char * > & | getEventDirectoryBeforeRemove () |
While this event is called, the information on the directory being deleted (such as 'isDirectoryWritable()') is still accessible via the AssetManager API. More... | |
static Unigine::Event< const char * > & | getEventDirectoryRemoved () |
The event is called when the directory is removed. More... | |
static Unigine::Event< const char *, const char * > & | getEventDirectoryMoved () |
The event is called when the directory has been moved or renamed. More... | |
static Unigine::Event & | getEventProcessBegin () |
The event is called when AssetManager has started asynchronous processing assets or directories that have been added, changed, moved, renamed, or deleted. More... | |
static Unigine::Event & | getEventProcessEnd () |
The event is called when AssetManager has finished asynchronous processing assets or directories that have been added, changed, moved, renamed, or deleted. 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 |
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 in 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 in 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 (including all subdirectories). These GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
|
static |
Saves to the vector specified as the argument GUIDs for all assets in the root project directory (including all subdirectories). These GUIDs can be used in calls to Unigine::FileSystem. Additional information for a given GUID can be obtained via the Unigine::FileSystem class.
asset_guids | The vector to store GUIDs for all assets in the root project directory (including all subdirectories). |
|
static |
Returns the list of GUIDs for all assets in the specified directory (including all 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 |
Saves to the vector specified as the argument the list of GUIDs for all assets in the specified directory (including all 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. |
asset_guids | The vector to store GUIDs for all assets in the specified directory (including all subdirectories). |
|
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 (including all subdirectories).
|
static |
Saves to the vector specified as the argument the list of paths for all assets in the root project directory (including all subdirectories).
asset_paths | The vector to store paths for all assets in the root project directory (including all subdirectories). |
|
static |
Returns the list of paths for all assets in the specified directory (including all subdirectories).
directory_path | Directory path for which all asset paths are to be retrieved. |
|
static |
Saves to the vector specified as the argument the list of paths for all assets in the specified directory (including all subdirectories).
directory_path | Directory path for which all asset paths are to be retrieved. |
asset_paths | The vector to store paths for all assets in the specified directory (including all subdirectories). |
|
static |
Returns the list of all subdirectories for the specified directory path.
directory_path | Directory path. |
|
static |
Saves to the vector specified as the argument the list of all subdirectories for the specified directory path.
directory_path | Directory path. |
directory_paths | The vector to store all subdirectories for the specified directory path. |
|
static |
Returns the list of all subdirectories for the root project directory.
|
static |
Saves to the vector specified as the argument the list of all subdirectories for the root project directory.
directory_paths | The vector to store all subdirectories for the root project directory. |
|
static |
This event may be called upon either of the following occurs:
/summary>
|
static |
While this event is called, the information on the asset being deleted (such as 'getAssetImportParameters()') is still accessible via the AssetManager API.
|
static |
The event is called when the asset has been changed OR the parameters of the meta have been changed, which caused the asset reimport and/or the meta file update.
|
static |
The event is called when the asset has been moved or renamed.
|
static |
The event is called when the asset is removed.
|
static |
The event is called when a new directory has been added.
|
static |
While this event is called, the information on the directory being deleted (such as 'isDirectoryWritable()') is still accessible via the AssetManager API.
|
static |
The event is called when the directory has been moved or renamed.
|
static |
The event is called when the directory is removed.
|
static |
The event is called when AssetManager has started asynchronous processing assets or directories that have been added, changed, moved, renamed, or deleted.
|
static |
The event is called when AssetManager has finished asynchronous processing assets or directories that have been added, changed, moved, renamed, or deleted.
|
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 |
Saves to the vector specified as the argument 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. |
runtime_guids | The vector to store all runtime GUIDs for the specified asset path. |
|
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 in 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 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 in 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 in 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 in 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 in 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 asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put in a queue, unlike the removeAssetSync() method.
asset_path | Path to the asset to be removed. |
|
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 directory asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put in a queue, unlike the removeDirectorySync() method.
directory_path | Directory path to be removed. |
|
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 |
Renames the specified asset asynchronously. The method is non-blocking and returns immediately, after calling it the operation is put in 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 in 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.