Get Name of Texture

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BigBackPack

Hey, I wrote a script (GDScript) to display a random selected texture on a “Sprite” Object after pushing a button. Now I try to find the right way to print (to the console) the name of the texture which was randomly chosen. How would I do that?

By “name”, you mean its file path? Textures don’t have names by default.

Zylann | 2020-05-11 20:19

Yes, I just realized that I have to use the whole path as reference and not only the name of the file itself. Thx for your comment :slight_smile:

BigBackPack | 2020-05-13 07:15