Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    198
    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:
      771
  2. Alex_May

    Alex_May

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

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    198
    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.