Author Topic: Upgrade Issues from 2.x to 3.5.1  (Read 3193 times)

nxnyo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Upgrade Issues from 2.x to 3.5.1
« on: February 24, 2014, 04:35:52 PM »
Hi, I am trying to upgrade my NGUI project from 2.2.6c to the latest 3.5.1. I think I have the same issue as the person in this thread: http://www.tasharen.com/forum/index.php?topic=3590.0. Our team had put the NGUI folder inside a similar Assets/External folder, and I've tried all the ways described in the previous thread to upgrade.

Problem is our project has gotten pretty big and redoing the UI is not an option.. The reason we want to upgrade is because we are facing a lot of z-sorting issues that the latest version seems to address. Every time I reopen the project all the Monobehaviours have gone missing.

Currently, I have freshly imported imported (in separate project) NGUI files copied (excluding meta files) into our own project, removed the deprecated files (TiledSprite, SlicedSprite, etc.), and currently see the following errors:

  1. Assets/NGUI/Scripts/Interaction/UIButtonPlayAnimation.cs(81,32): error CS0426: The nested type `OnFinished' does not exist in the type `ActiveAnimation'
  2. Assets/NGUI/Scripts/Interaction/UIButtonTween.cs(80,26): error CS0426: The nested type `OnFinished' does not exist in the type `UITweener'

I also tried importing the UpgradeWidgets scene so that I could run the update script but the menu option does not come up from the NGUI drop-down menu nor right-clicking in project view. Any help or insight would be greatly appreciated, and thank you so much for your help!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrade Issues from 2.x to 3.5.1
« Reply #1 on: February 24, 2014, 04:56:37 PM »
UIButton scripts don't exist anymore. They were renamed to UIPlayAnimation and UIPlayTween, respectively.

nxnyo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Upgrade Issues from 2.x to 3.5.1
« Reply #2 on: February 24, 2014, 07:29:21 PM »
Thanks for the quick reply!
What did UIButtonSound get renamed to? I am cross-checking with the update forum topic http://www.tasharen.com/forum/index.php?topic=11.0 but can't find what ButtonSound got changed to. Thanks so much!
 -- Nvm realized it does not exist anymore. How can we now access the button's sound?
However, all the buttons that had "UIButtonSound" behaviour attached to them now have missing references. What is the best way to fix them?

Also, since we can no longer call .End() for UITween, is there a way to end the tween on purpose?

Thank you very much!
« Last Edit: February 24, 2014, 09:53:49 PM by nxnyo »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrade Issues from 2.x to 3.5.1
« Reply #3 on: February 25, 2014, 02:50:22 PM »
UIPlaySound.

You kinda shot yourself in the foot by not copying the metadata the first time. Doing so breaks all references, so now your upgrade process is a lot more difficult.

To stop a tween, disable the component.