How can I get a specific texture that is in a location (Content\UMG humbnails), when I only have the name (string value) of that texture.
My texture is named testTexture (that is also the string value that I have in my string variable).
So I created a texture array that is encompassed within that blueprint, and then I loop through the elements to check whether the object display name from each element matches the requested one. The texture object that is referenced does not refer to the texture that is found in your thumbnails file location.
Thank you for the clarification. The thing is that you’ve add the textures upfront, manually in the array, before pressing play. What I’m wanting is to be able to dynamically (in runtime) find and get the texture (that is in the content browser) just by the string variable. Is there anyway that I can avoid putting the textures manually in the, array?
I couldn’t find any functions pertaining to the texture class that would allow you to set a texture based on a string variable. However, it is definitely possible to implement this in C++, you can convert your BP object into a C++ class and extend it with certain functions of yours.