Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Accessing tightly-packed atlas UV coordinates from a Sprite reference

Discussion in '2D Experimental Preview' started by Alex_May, Oct 29, 2018.

  1. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    146
    There seems to be no way of getting these besides going through the mesh UVs and doing a min/max. Even that might not return the original rect extents if the mesh is a polygon that is smaller than the original rect. Am I wrong?
     

    Attached Files:

    • ssss.jpg
      ssss.jpg
      File size:
      150.6 KB
      Views:
      177
  2. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    146
  3. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    146
    Oh I get it - if the sprites are tightly packed then rects are not valid drawing primitives because they may contain parts of other sprites.