I would like the player to be able to use their own artwork for the avatar and some other assets. Maybe Have them enter the file path and name then have it load in game. Or have a designated folder that you just drop an .jpg into and it automatically uses it. How would I go about doing this?
Finding the file
Creating an asset with the file at runtime (if that is what’s needed)
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.
Then here’s the C++ variant for those who need it:
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
I successfully used ImportFileAsTexture2D to load a texture externally at runtime, but I’m now encountering an issue: I want the imported texture to enable Virtual Streaming. However, ImportFileAsTexture2D internally calls UTexture2D::CreateTransient to create a temporary UTexture2D object from the loaded image data. The created UTexture2D only contains basic MipMap data (PlatformData->Mips), and it lacks the precomputed data FVirtualTextureBuiltData (PlatformData->VTData) required for virtual textures. This VTData is typically generated in the editor when VT is enabled and built/cooked, containing tile information, level details, and other data needed for the VT system to function. How can I resolve this issue?