For Python Developers
This page is for developers to be aware of some key features
This plugin was developed in Unreal Engine 5.2 using a mixture of C++, Blueprints, and Python 3.9.7.
The core logic used by the Asset Library is available in the following module:
Registering an Asset
To register an asset we can use the following code example:
The asset
input can be either a string path to the Content Browser asset or an unreal.Object object
This function will take the inputs, apply them as Metadata on the asset in Unreal, and then save the asset.
Unregistering an Asset
To unregister an asset we can use the following code example:
The asset
input can be either a string path to the Content Browser asset or an unreal.Object object
This function will remove the Metadata from the asset and then save the asset
Get an Asset's Data
To get the Asset Library data for a registered asset, we can use:
The return is a tuple with the following ordered data:
List the Asset Types
To get a string list of the available asset types we can use the following function:
the include_all_option
argument controls whether to include an "all" entry by default. This flag is enabled when getting the list to provide the UI
List the Categories
To get a string list of categories for a desired asset type we can use:
If the asset_type
is not provided this function will return every category found in the project for all asset types
the include_all_option
argument controls whether to include an "all" entry by default. This flag is enabled when getting the list to provide the UI
List the Registered Assets
To get an unreal.AssetData list of assets registered in the Asset Library we can use:
Both arguments are optional, if an asset_type
is provided it will only get assets of that type, and similarly if a category
is provided it will only get assets of that category
This function returns the entries as a list of unreal.AssetData objects
Last updated