I simply want a property (variable) that is a list of textures with images that I can choose from to set a texture property. So, like a regular texture selector but limit to a specific folder or custom list array. I have tried all sorts of ways in the construction script but this did not help. I was able to create and populate a structure but the structure was not editable so I could not use that.
Hey there @DarkLordDan72! Welcome back to the forums! So all you want is an array of textures that you can iterate on in Blueprints/Construction BP like this is that correct?
If that’s the case, head over to your variables and make a new one:
Then type in texture and scroll down until you get just texture, then object reference:
then select that new variable and go to it’s detail panel. It’ll look like this (the bottom will say please compile, you can but we have to do it again after we change this):
Click that dropdown and change it to an array, then compile.
From there you can add defaults in the details panel here at the bottom or in code if you’d like.
And voila! You can manipulate that array however you’d like!
This is great stuff and I got this part to work but I am dynamically loading the array and can see the textures fine. What I want to do is have a dropdown from the actor blueprint where I can select one of those textures via checkbox or something so I can use that selected texture for input in another function. It’s running from the construction script of the actor blueprint. So I want to see the texture options and be able to select one of them if that makes sense. Appreciate the input!
So, it seems that this is not possible the way I was hoping to do it. However, I did find a feasible slightly ugly way to do what I wanted. I can show a list of textures and their index and then have an enumerator that just has the same number of items and use the enumerator to drive the choice selection. It’s not pretty but this way I know what texture I am selecting. Still wish there was a way to do it in one “texture dropdown”
Ahhh if the Enum or the Array element interface isn’t the best for the situation, you have a couple of other options. If everything you do is outside of runtime however you could play around with editor utility BPs.