Hello Guest

Author Topic: Upgrading issue  (Read 5067 times)

gdeglin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Upgrading issue
« on: March 22, 2013, 12:33:42 am »
I'm trying to upgrade from 1.9 final to 1.9.2 beta 3 on Unity 4.1.0f4.

If I try to import the new version while the old one still exists, I get a bunch of errors about imported types being defined multiple times.

I tried rebuilding the project index, but that seems to completely break everything. Specifically, the 2dtoolkit menu gets reduced to just "Setup for Javascript" with no other menu items & I can no longer create any 2dtoolkit components. It breaks so badly that I have to restore the project from a backup.

Is there a more correct method for upgrading the 2dtk package? If I delete it first, won't that break all of my existing sprites?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrading issue
« Reply #1 on: March 22, 2013, 12:40:24 am »
1. Do you use javascript?
2. Have you moved tk2d from the default directory?
3. Did you do it from outside Unity?

gdeglin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Upgrading issue
« Reply #2 on: March 22, 2013, 12:43:24 am »
1. Do you use javascript?
Yes

2. Have you moved tk2d from the default directory?
No

3. Did you do it from outside Unity?
No

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrading issue
« Reply #3 on: March 22, 2013, 01:16:04 pm »
The issue you describe only happens when metadata is broken. This usually only happens when one of the 3 things there happened, or sometimes when sharing / backing up the project folder without meta files using dropbox, etc.

Easy way to find out what is broken -
1. Make a backup IMPORTANT
2. New scene
3. Delete all tk2d stuff
4. Import new package
5. Check your stuff still works

I have a half completed "integrity checker" script, but I'll complete this for the next version.

gdeglin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Upgrading issue
« Reply #4 on: March 29, 2013, 06:19:10 am »
I think I was finally able to get it working. I tried following your steps, but deleting all the tk2d stuff would cause every single one of my tk2d related gameobjects to get disconnected from the correct tk2d script and it would have taken forever to fix them one at a time.

Here everything I did to finally get it working (most likely not all steps were required):
1. Downgraded to Unity 4.0.1
2. Disabled then re-enabled meta files
3. Switched to a blank scene
4. Moved all code from plugins/tk2d/ into TK2DROOT/tk2d/Code
5. Installed latest version tk2k ( 1.9.2 final, patch 1)
6. Setup for JavaScript

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Upgrading issue
« Reply #5 on: March 30, 2013, 05:33:00 pm »
if you deleted it, and all your game objects got disconnected, it implies the GUIDs are broken. Did you ever check into version control / move project without .meta files turned on?

gdeglin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Upgrading issue
« Reply #6 on: April 01, 2013, 08:30:55 pm »
if you deleted it, and all your game objects got disconnected, it implies the GUIDs are broken. Did you ever check into version control / move project without .meta files turned on?

Interesting. Not that I know of. I do use version control pretty heavily (using GIT), but meta files are turned on and I always check them in.

Hopefully disabling and re-enabling meta files fixed this going forward. It looked like this caused them all to be deleted and then re-created.

I've since upgraded to Unity 4.1.2 and things seem to be working well now. Thanks for the help!