Search Unity

Getting Packed Material/Texture from a Sprite Reference

Discussion in '2D' started by Jeiel, Jan 10, 2014.

  1. Jeiel

    Jeiel

    Joined:
    Apr 23, 2013
    Posts:
    7
    Is there a way to get the packed material/texture from a Sprite reference? I'm able to get it from the SpriteRenderer but it would be more ideal to get a reference to the material from a Sprite.
     
  2. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    No, because the sprite class really only tells unity what section of the image to use for a specific sprite. The renderer holds all the good info about the texture2d.