Hello Guest

Author Topic: -tk2d has empty slots!  (Read 5574 times)

abs@syncinteractive.co.uk

  • Newbie
  • *
  • Posts: 3
    • View Profile
-tk2d has empty slots!
« on: May 13, 2013, 09:37:33 am »
Hi I've been using 2D Toolkit for all of my games and this is the first time I'm having difficulties with it. Out of no where I've an error saying missing reference and when i check the -tk2d file the Sprite GUI and Sprite Names have empty slots. Please advise on how to fix this. Thanks.

Abdullah.





unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: -tk2d has empty slots!
« Reply #1 on: May 13, 2013, 10:13:25 am »
Hi,

You've not mentioned any background about how this came about...
1. What version of 2D Toolkit. Did you update recently?
2. What version of Unity. Did you update recently?
3. When did it break?
4. Do you use version control? Meta files? Dropbox? Text serialization?
5. Did you delete any files in the project?
6. Have you tried Rebuild Index? (backup first before trying this)


Where do you get a missing reference error?

abs@syncinteractive.co.uk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: -tk2d has empty slots!
« Reply #2 on: May 13, 2013, 10:23:39 am »
Im using Version 1.6 final patch 1.
I have Unity 3.5.6 f4.
This morning when i loaded the game up and tried to play through. It was fine on friday. And no one has touched the Mac since.
I use Meta files.
I think the break might have happened when i tried to update the 2D Toolkit but then decided to keep the old version as the game is almost complete. And i have tried rebuilding the index. and its still the same.

I have been doing some debugging and It isn't the -tk2d file its the SpriteCollectionBuilder It is adding empty sprites that are not there. So i did a commit on the Atlas Builder and when i checked the sprite definitions it had empty sprites in there. called Element (id) etc.

Thanks

Abdullah

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: -tk2d has empty slots!
« Reply #3 on: May 13, 2013, 10:44:08 am »
The sprites aren't there because the source files were deleted?
Previous versions never actually detected or alerted the user to the error, newer versions did. But you're on 1.6 which is ancient...
I'm not sure I understand the "tried to update 2D Toolkit" bit - did you update it and then revert?

abs@syncinteractive.co.uk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: -tk2d has empty slots!
« Reply #4 on: May 13, 2013, 11:00:59 am »
how could they have got deleted? Because i never touched the mac until this morning.. Basically i went onto the asset store did an update and import but it clashed with all the previous scripts so i removed the 1.6 scripts manually then there were many errors to do with my code. so i reimported 1.6 scripts and deleted new scripts. But atm i have got it to work again, but it still shows empty sprites.

Abdullah.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: -tk2d has empty slots!
« Reply #5 on: May 13, 2013, 11:17:16 am »
Updating to 1.9x will rebuild index when you select something in the scene. Since all the versions would be outdated then, it will rebuild everything - but, if there were some broken assets in there already, eg. which was not obvious if you didn't rebuild anything, and had no reason to rebuild anything anyway - rebuilding everything would make the already broken assets "break" properly.

Anyway, your best bet is to revert via source control / backup - you'll find that a lot of files may have changed. If you cant do that, you'll have to update to 1.9x and manually fix all the broken references in the sprite collections. Email support for more details on what you need to do, and what errors you get, etc.

The fact that you had a clash with the previous scripts suggests that the scripts may already be broken at that point? Did you at some point in the past share the project without meta files, etc? Or, that they weren't going into the right directories (did you move the installation directory?)