import ressource at runtime


There is there a legal solution to load a complete model (Mesh + meterials + skeletal + animation), during the execution of the software? (User Action to load the file of your choice).

Is the format “.uasset” would do this?

Best Regards.

I’d like to know this too!

How about mesh files that are not assets? Say I wanted to load a mesh file on an end-user’s running game, and that mesh file has not been placed in the editor.

It depends on what do you want to import.

Textures for example:

FString Path = GameDir() + "Content/MyAsset.png";
UTexture2D *MyTexture = Cast<UTexture2D>(StaticLoadObject(UTexture2D::StaticClass(), NULL, *Path))

For more info about it:

It should work with any supported asset type.
If you want to import different model formats you have to implement them yourself as far as i know.

I updated my answer. It should work with Static Meshes too. I had to load models that were not supported by the engine. I used assimp to import them at runtime. I hope it helps.

I also need to upload models runtime.

How to import assimp during runtime?