Author Topic: default sprite sizes  (Read 2226 times)

PapaWhiskey

  • Guest
default sprite sizes
« on: April 12, 2013, 09:02:58 AM »
did a quick search of the forums this morning and didnt find an answer so i'll ask....

how does NGUI determine the size (or scale) of a sprite (sliced or otherwise) when adding to a scene...NGUI never seems to set the scale of a sprite equal to what the original size is...i.e. if i have a sprite that is 64x64, after adding it to a scene, the scale might be 100x100, or might be smaller as well...clicking on "make pixel perfect" doesnt seem to affect anything.


Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: default sprite sizes
« Reply #1 on: April 12, 2013, 12:16:48 PM »
Regular sprites are set to the correct size.
Sliced Sprites are pixel perfect as long as they are not half-pixel size, so they are rounded to nearest int.
Not sure what tiled and filled sprites do - probably the same as sliced sprites.

PapaWhiskey

  • Guest
Re: default sprite sizes
« Reply #2 on: April 12, 2013, 12:30:50 PM »
even rounding to nearest int would be fine...but going from a 210x128 to 500x500 is not just "rounding up" :)

havent updated ngui in a month or two, so maybe i'll do that and see how things are, although i'd bet i still have to go through all my sprites and determine if they're the size i want or not

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: default sprite sizes
« Reply #3 on: April 12, 2013, 12:57:09 PM »
Hmm, now that is strange. :)

I'm fairly certain that they're not supposed to do that! :D