Loading and Using New Assets at Runtime

Hey there @Seed_37! So it’s dependent on if you just want a texture2D or not. If that’s all you want, the Import File as Texture 2D node will do just fine. It returns a Texture2D with the image.

image

Then here’s the C++ variant for those who need it:

FString FilePath = "C:/Users/MyUser/Images/MyImage.png";
UTexture2D* MyTexture = FImageUtils::ImportFileAsTexture2D(FilePath);

That said, having the player input file paths is… tedious to say the least. So here’s a free marketplace plugin by Firefly Studio that let’s you look directly for a filepath in an OS window. I believe it’s windows only however so you’d have to expand it by hand if you support other OSes.

This is not an endorsement by Epic Games, I just use this plugin and I love it

Let me know if you have any questions!