Is there a way to import assets from a specific filepath dynamically/at runtime?

I’ve been trying to figure this out with other questions and various searches, but I’m not turning up much luck. So, I thought I would see if any of you knew anything about this.

I’m working on a game currently where we want the player to be able to take screenshots of the environment, and then be able to use those shots later on in a menu system. I’m currently using a system in blueprint that calls a console command to take a HighResShot, which saves it to the screenshot folder automatically. What I’m stumped on is whether or not there is a way to then take that shot and import it as an asset where I can then replace the default texture/image of the menu widget with the screenshots, allowing the player to go through what they’ve seen and taken captures of.

I’ve noticed that blueprint allows to create a dynamic material instance, so once I find a way to get the screenshot imported as an asset at runtime, I should be able to implement it without a problem.

Does anyone know a way to import an asset from a specific filepath at runtime/dynamically? And, furthermore, is there a way to do this in Blueprint?

Thanks ahead of time for any help or advice you can give!

You can try this: [🌞 Victory Plugin ~ Rama's Extra Blueprint Nodes for UE5, No C++ Required!](https://Victory plugin)

This plugin has blueprint node for loading texture2D from image file and can be used in runtime :grinning:

you cant import into the content browser at runtime, but for screenshots you can go the other way: read the png/jpg straight off disk into a UTexture2D at runtime and hand that to your menu widgets, no asset import step needed.

if players drop new shots into the folder while the game is running you also need to know when a file appears, instead of polling the folder every tick.

Runtime Directory Watcher, a runtime folder watcher plugin for Unreal Engine 5, fires Blueprint events when files are added or changed and loads png/jpg into UTexture2D without hitching: Runtime Directory Watcher — Hot-Folder File Events & Async Texture Loader | Fab