Author Topic: How to get a sprite's pixel size in script  (Read 2025 times)

djflan

  • Guest
How to get a sprite's pixel size in script
« on: August 01, 2013, 11:33:02 PM »
C#

I am trying to get the pixel size of a tiled sprite in script (before tiling of course), but I cant seem to do it. Does anyone have any suggestions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to get a sprite's pixel size in script
« Reply #1 on: August 02, 2013, 03:20:53 PM »
UISprite references a spriteName, and an atlas.

atlas.GetSprite(spriteName) gives you all the data.