How to get Texture name

Hello,

I’ve a situation that I need to change texture of a gameobject while game is running. I used SetTexture() function to do it. But how do I find texture name of a GameObject in script ? i.e. which texture is in the GameObject now !

Any help ? :frowning:

Thanks in advance . :slight_smile:
_Masudias

use

renderer.sharedMaterial.mainTexture.name

Julien G.

1 Like