Author Topic: Best way to keep your changes/additions to NGUI files unharmed, after upgrade?  (Read 1974 times)

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Hi, when I upgraded to NGUI 3.0.2 from 2.6.4 - I had some extra stuff, in some NGUI files. For example a 'saturation' property in UIWidget, 'GetMouseClick' in NGUITools, etc. When I upgraded, of course, I have to copy paste the functionality and move it again to the new files. Not very efficient.

What's the best way to tackle this problem?

I guess, maybe for the saturation, I could have some extension methods, like a static class UIWidgetExtensions, and put the stuff there in a separate file so that it won't get harmed?

But what about, static functions, like the one I had NGUITools.GetMouseClick - Extension methods won't work here, so I guess, I have to create my NGUIUtility and put my stuff there?

or...?

Thanks for any tips :)

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
You can extend and override and make your own Utils class, or you can pay for the NGUI professional licence - it gives you access to the github repository and you can branch your own NGUI off it and pull the version changes when they are released.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
I overwrite NGUI with new updates and check the SVN log of the changes and splice my own changes back in before committing it.