Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

How to get name of SpriteAtlas via code?

Discussion in '2D' started by HuldaGnodima, Apr 3, 2021.

  1. HuldaGnodima


    Oct 10, 2016
    I tried getting the Atlas-name like this (because that's how I read it should be done online, for example here):;

    However when I do this for some reason got a really long name (instead of the Atlas' name). My real atlas name is :


    But when I via a code and a sprite accessed its name I get:


    Does anyone know why this long name appears instead? And how I could fix it (so I only get the shorter resource name)?

    Thanks in advance!
    Last edited: Apr 3, 2021