Hello Guest

Author Topic: Upgrade from a very old version to the current version in one shot.  (Read 4224 times)

marcosramos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
We got an old project that we weren't editing for a very long time. And now some modifications are required.

Ends up that when i try to upgrade (direct from the asset store), at first it seems everything is alright,  (only one error the repaint one that i searched on the forum and it seems it's about GUI and it wouldn't mess anything) but when i commit any collection everything goes insane. The whole project breaks and there is not a single warning about what may have happened. It reached a point where i would have to redo the whole game to adapt it.

One of the examples is that all collider are set to "Force None". Some sprites even with materials and rendeder  are not showing. The position of everything instantiated at runtime is messed, eveything seems to be instantiated at the same point. Everything is a mess.

The version of my Tk2d in this project is 1.51. (I moved the tk2dindex to the editor folder as i knew this was one of the issues)

Is there anything i can do to fix this? Maybe an intermediate version between the current and mine that had major changes before i can upgrade to the current version?

Thanks in advance.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrade from a very old version to the current version in one shot.
« Reply #1 on: November 08, 2012, 06:50:11 pm »
I usually test upgrading, but not that far back.
In this case I'd try updating to 1.7 first - commit sprite collection to make sure everything still works there. If you could send me a sample with one sprite collection still on 1.51, where it breaks when updating to 1.8, I could probably fix it properly. Let me know if that's possible - I could fix this for tonights release if possible.

Edit: support@unikronsoftware.com if possible.
« Last Edit: November 08, 2012, 06:54:43 pm by unikron »

marcosramos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Upgrade from a very old version to the current version in one shot.
« Reply #2 on: November 12, 2012, 05:36:42 pm »
Just sent you an email.

They had to approve the package i'm sending to you, so it took a while.

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrade from a very old version to the current version in one shot.
« Reply #3 on: November 12, 2012, 05:43:08 pm »
No problem. I'll look into it in the next day or two.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrade from a very old version to the current version in one shot.
« Reply #4 on: November 14, 2012, 12:46:40 am »
Update: Turns out there wasn't an issue with the update, but there was an issue with script execution order. With 2D Toolkit 1.80, the sprite mesh doesn't exist until Awake is called on the sprite. In certain cases, for example when another script is attached to the same object, reading renderer.bounds, it will read 0,0,0 until the mesh exists. In this case, it was being called from another scripts Awake function, which was being executed before the sprite Awake (which creates the mesh).

2D Toolkit 1.90 will have a sprite.Awaken() function or something similar which should be called before accessing a sprite from Awake(). This is slightly inconvenient, but saves a ton of performance checking if (!sprite.initialized) everywhere just for this one case.