Author Topic: Upgrading to 3.0, some breaking changes  (Read 1843 times)

appminis-mike

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Upgrading to 3.0, some breaking changes
« on: November 12, 2013, 03:11:59 PM »
I'd like to update to the latest version of NGUI, but doing so broke a few things for me:

1. UIAtlas.Sprite is apparently replaced with UISpriteData. I was setting UIAtlas.Sprite.inner and UIAtlas.Sprite.outer in code. What are the equivalent properties/methods to set within UISpriteData? SetBorder and SetPadding?
2. UIAtlas no longer has a MarkAsDirty method. Is this just no longer needed? Or is there something else I should call?
3. UIFont no longer has a dynamicFontSize. Should I be setting defaultSize instead?
4. Is there a list of 3.0 breaking changes in case other things pop up?

Thank you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrading to 3.0, some breaking changes
« Reply #1 on: November 12, 2013, 03:32:38 PM »
1. Border and padding are specified in pixels, and are pretty straightforward, unlike the inner/outer values.
2. MarkAsChanged() is used everywhere now instead of a mix of MarkAsDirty / MarkAsChanged.
3. Yup.
4. There was a post about it with in the 3.0 days... I think it's still linked to from the version notes thread in the 3.0 post.

appminis-mike

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: Upgrading to 3.0, some breaking changes
« Reply #2 on: November 12, 2013, 05:09:22 PM »
Thank you. Migration complete. I can already tell that I'm really going to like version 3.0!