Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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:
    158
    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:
      432
  2. Alex_May

    Alex_May

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

    Alex_May

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