Able to use an image Data Table to dynamically add to a carousel?

Hey all!

Working to build out a carousel and want the images to be dynamic.

Are there any options to use a Data Table of images, or is it just easiest to do this with visibility?

Thanks!

Id like to say it is, though I can’t say I understand exactly what you’re trying to do, you could create an array, or map variable in the data table, of image references, and randomly select, or specify from those values to assign images to your carousel

Is that in C++ only or in Blueprint too? I can’t see the methods by which to assign the images in Blueprints dynamically.

Thanks!

Depends on what you will do as said before.

However if you want a truly dynamic approach there is couple of ways you can take

  1. You make your carousel, use DownloadImage to download images from net, save them or cache them and display. If you update images in the source they will update in the engine aswell . UAsyncTaskDownloadImage::DownloadImage this has already have a blueprint node btw.
  2. You can use the images from the local as static (local disk) with a cron job, timer or detect changes in the local repo and update images in unreal. You can simply update images on local machine with a tunnel (software, scripts etc)
  3. You have static image links in a json,text .. This is equivalent of having a data table, these strings are passed to DownloadImage wrapper, on success added to que (like in 1) however you update the json strings only on remote cloud somewhere.
  4. Longer way : You can make a file picker for operating system in unreal and use same methods as download image or import from local url.

Some links around subject

Thanks for that, all good detail.

I already have the pictures; I just want to control which are loaded in to the carousel dynamically.

Thanks!

No worries, I can just tell you a method however would be great if you tell me the gameplay aspects if any (if you can) so we can be more helpfull.

However you can simply select data from table

ImagesArray(name) → Car, Building, Apple

ForEach Images in ImagesArray->GetDataTableRow->OutRow->Break->Image->AddtoCarousel?

Give us details if you are not looking for this? Cause in first post I understood that it is “Dynamic Images” however in the next one as far as I understood images pool is static but carousel selection is dynamic. If that so you can define an array as above to select rows from array of images.

You can do like this also if you have trouble. Make an Tmap anywhere in bp and a string array
image

add your images to tmap

in your array ImagesInCarousel do your logic

Thanks!

Yes, it’s this AddtoCarousel? part that I don’t see a method for in the Unreal documentation:

Carousel | Unreal Engine 5.5 Documentation | Epic Developer Community

Essentially, I just want a carousel in some User Widget (in a Widget Blueprint) that I can control which images get loaded into the Carousel object.

himm I understand never used it before, I generally craft my own things if there is not.

But I just gave a shot to it and something like this enough for you to update images in it, after you selected images you want from a pool with the scripts defined in post, you can refresh carousel images like below.

PS:

Was just indicator that you have to add this to your carousel logic, whetever you using the common ui carousel, UCommonWidgetCarousel or you have your own carousel, nothing more.