


We can now iterate on our assets and find one (or more) assets which fit our needs. In this example (we are in debug mode), we can see the list of assets retrieved by the function. the screenshot below), it is “/Game/Meshes/Train”. We fill the “ PackagePath” using the path where the assets are located. We will retrieve all assets in this folder and then filter them by name or type. For this tutorial we’ll only use the GetAssetsByPath function but you can explore and try to use the others by your own.įor our project, the StaticMesh we want to load will all be located in a particular folder.

You can see here all the functions provided by the AssetRegistry. But, we will use the AssetRegistry system to load files once the game is packaged.įirst, we have to get the AssetRegistry by calling the corresponding Blueprint node : The Content Browser uses the AssetRegistry while we are developping with the UE editor. This information is stored in memory so the editor can create lists of assets without loading them. The AssetRegistry is an editor subsystem which gathers information about unloaded assets asynchronously as the editor loads. We decided to use a Datatable in which all assets informations are stored including its path in the project and its name.įinally, we used the AssetRegistry to load the asset and get a reference using its path. We had to create a blueprint to specifically load one asset or another by specifying its name. In this short tutorial we present how we’ve managed to do it, and especially how we were able to programmtically load an asset by its path. This happened to us when we were working on a big project, in which we had a lot of assets automatically imported from FBX files and we needed to be able to instantiate them using their name at runtime. In some projects, when we are working with a lot of assets, we may need to be able to programmatically get one/load one using its path.
