Trying to import a PNG file from a local folder during runtime to display on a widget

Trying to import a PNG file from a local folder during runtime to display on a widget

So far I have a way for the user to select the file, and I take that file directory and name and I append a “File://” to the front of it… then it goes to a [Import File as Texture 2D]… then the return value I plug into a [Make Slate Brush] and I add some “Image Size” numbers… then the Slate Brush output goes to a [Set Brush] pointing to the target being my variable widget. But nothing. What am I missing?

https://imgur.com/a/MJ3H4da

have you tried set brush from texture and skip slate step?

image

same thing happens, nothing shows up.

I keep reading maybe I have to assign it to a plane and maybe make an instanced material? I dont know how to tell unreal engine to “Make a new Texture” just like when you drag in a texture into the editor’s content browser.

Ideally I would do that, “Make a new Texture” and then be able to save it so its there next time for the user.

it just works

image

I think your problem is the file name\location

Edit:

trying to get a project relative folder I moved the file to \content\photofolder and did this:

2 Likes

yes i didnt need the “File://” I can now have it display on the widget. Now I need to figure out how to save it so its stored into an actors variable as an image texture.