Search Unity

How to get access to the texture generated by built-in Sprite Packer?

Discussion in '2D' started by illinar, May 24, 2015.

  1. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    I have a tile map which takes sprites from my assets and combines them into one mesh. Now I need to assign material with the atlas texture generated for sprites (sprite atlas).

    The problem is that when I take material from one sprite that uses the atlas I need, and assign that material to the map, I get a material with no texture. And attempts to get texture from the sprite return null.

    How do I get the sprite atlas texture?
     
  2. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    Hi,

    This is not possible right now. That's why we are developing a proper Tilemap feature. Because know it is a hard problem to make a performant one.

    Take a look at this and help us test the tile map feature.
    https://bitbucket.org/Unity-Technologies/2ddemos
     
  3. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    That is great, especially if this Tilemap is very flexible and extendable. But also I think it really makes sense to allow the current Sprite Packer to render into asset texture.

    For now I will find another way to build atlas for my custom Tilemap. It has very specific requirements so I cant use yours.

    Thank you for the response!