Download

BP - Give user option to input URL image at runtime

Hi, I’m making a demo of an art gallery. I want to give the user the option to walk up to a picture and then a widget is triggered and pops up, where the user can input a URL to a new picture and load their own pic in the painting. I was watching this tutorial - Streaming Textures and Videos in UE4 | Live Training | Unreal Engine Livestream - YouTube at 39:57 the question is asked which is what I need to do. Any suggestions or help would be very much appreciated. I was looking at the Download image node but how do I let the user paste in their own URL so they can populate the gallery with their own images.

BP Download image: Download Image | Unreal Engine Documentation

Thanks for the feedback, any chance you could show me what the BP might look like, I have a download Image node in BP. I’ve also been told to use Editable text box so the user can paste the URL in the editable text box and then hook that up to my Plane variable which will display the image. My BP knowledge is not good, still learning.

Thanks. I’ve got as far as I have a triggerbox that triggers the Widget when the player touches it. The textbox shows up when the box is triggered. I now need the player to be able to paste a URL into the textbox and the picture shows. I followed this tutorial - Streaming Textures and Videos in UE4 | Live Training | Unreal Engine Livestream - YouTube at around 15min38sec he makes the blueprint to call pics from URL. How do I connect that blueprint to the Widget so when the Widget triggers the player can paste URL? Any help would be very much appreciated.

Broad process would be: On interact (trigger box) create widget -> pass reference of the BP_imageDownloader to the widget. When address is submitted (button) the reference is used to call an event and pass the string value to the image downloader. Said event downloads the image and applies the returned texture.

Taking from the video … create BP_ImageDownloader2. Set up everything the exact same way, except for the Begin play section. Instead of Begin Play create a custom event. Call it “Update Image”. Add a “String” input to the event.

Update Image (Event): validate string isn’t empty -> Download Image -> set texture etc.

In the Widget BP go to the Graph and create a new variable “DL_Object” (BP_ImageDownloader2, actor obj ref) … save

When you create the widget cast to its class, As the class set the “DL_Object” variable. I’m assuming your trigger box has a reference to BP_Imagedownloader2.

Now your widget has a reference to the actor class that will download and display the image. So On click, get the DL_Object reference and call Update Image event…pipe the text to the string input.



Thanks so much for the feedback and help, it is very much appreciated.