I would like to change the texture on the HUD based on an integer variable. I created an array list with my texture names, so every texture name has a reference number now like this:
0 - texture01
1 - texture02
2 - texture03
etc.
Not sure how to proceed from here. How can I connect my array output to define the texture input? This is where I would like to feed this data:
To be clear: I have a variable integer number, lets say a level counter, and every level has its own texture. I would like to set the texture based on the integer variable. I have loads of textures so connecting them manually is not an option but a pain.
Any help is really appreciated, I’m stuck here for days now
I managed to pair up the Level Counter variable and the List of Textures array. I gave it a try and works fine with Print String, however I’m still stuck at the point where I should feed the name of the texture to the Draw Texture node. Any ideas on that?
It’s not a name that you should supply, it’s the texture structure itself. Try creating an array of texture2d structures by simply creating a new variable and typing in “Texture2d” in the menu where you pick int/float/string. You can make it into an array/list. Then all you have to do is to rewire the blueprint to get the texture from it instead of a list of strings.