Hello Guest

Author Topic: Extra sprite collection data objects and version control  (Read 7840 times)

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Extra sprite collection data objects and version control
« on: June 10, 2014, 07:47:21 pm »
My team has mistakenly been working with the -tk2d.asset file in Perforce, and as such have run into a few issues.

We have removed -tk2d.asset from version control but need a little assistance in cleaning up the project. TK2D seems to have generated a few extra sprite collection data objects for each sprite collection, and in a number of cases, has linked Sprite animation data to the wrong sprite collection data GUID. This does not seem to be fixed by getting a version from version control: for example, if my Sprite Collection is referencing the incorrect data object, even force getting the file from perforce seems to not change its referenced object.

I can go through and delete the extra sprite collection datas and make sure the guids are linked correctly, but what should we do to ensure that this doesn't happen in the future. Now that -tk2d.asset is no longer versioned, will this work:

(1) delete our -tk2d index files
(2) ensure we have the correct versions of the data objects and animation assets
(3) rebuild the index

Or are there other files that may have been corrupted?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #1 on: June 10, 2014, 10:35:16 pm »
Adding -tk2d.asset won't cause issues like you describe. It looks like the 2 issues are happening independently... Might be worth finding out who is checking in the duplicate files, there might be some pattern to the madness.

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #2 on: June 10, 2014, 11:32:35 pm »
One of our members is working on a Mac, and everyone else is on Windows.

Could that be related to the duplicate sprite collections?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #3 on: June 10, 2014, 11:58:50 pm »
No, that should work fine. We use macs and windows on the same project all the time.

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #4 on: June 11, 2014, 12:15:43 am »
I'm not certain then--the extra sprite collections seem to be originating on multiple computers.


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #5 on: June 11, 2014, 11:14:45 am »
Hmmmm, that is really strange. The only times I've seen that happen is when the project is corrupt, but that doesn't seem to be the case in your project, and another is a really obscure unity bug. Is it still happening?

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #6 on: June 11, 2014, 12:57:30 pm »
Yes, it happens with (somewhat unpredictable) regularity. The most common outcome is the sprite animations becoming delinked from their proper collections, but the duplicate collection data objects are not uncommon either. I think we've seen it at least fifteen times in the last month?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #7 on: June 11, 2014, 01:05:36 pm »
Ok the problem that causes this is the sprite collection object losing reference to the data object, then that cascades all the way from there. Next time you build the sprite collection it creates a duplicate because it couldn't find the original one. Its probably worth checking if the animation is still pointing to the original one in that case, or is it actually losing connection altogether - if you're using text serialization thats pretty simple, just look at the GUIDs in the asset file to figure out whats going on there. Otherwise take a look at it in debug inspector mode to see whats happened. Finally, take a look at all your sprite collections just to be sure that its linked properly, and every time you check out / update, rebuild the index... hopefully this will get us closer to identifying the specific issue you're facing.

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #8 on: June 11, 2014, 01:21:07 pm »
I went through, deleted all the extra collection data, and made sure that all of the sprite collections / sprite animations were linked to the proper, remaining data object.

I then deleted -tk2d.asset and rebuilt my index. I notice that under "Sprite Collection Index", there is a mysterious entry named "Element 21" with a data GUID and no other GUIDs.

Could this be part of the problem?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #9 on: June 11, 2014, 01:28:32 pm »
No that should be OK, that implies an orphaned data object with no matching source sprite collection somewhere.

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #10 on: June 13, 2014, 10:00:12 pm »
Alright, after cleaning up the project (removing all duplicate objects, ensuring that all existing objects were linked together properly) and ensuring all the proper files were not in version control, we are still encountering the problem.

It REALLY seems like the problems are originating on the Mac user's computer, but I still can't be certain.

Any other ideas?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #11 on: June 13, 2014, 11:31:20 pm »
Right. Try this. Reset the libraries folder on all computers. Make a backup of the original project folder so you can restore it if necessary. I had Unity crap out on a completely unrelated project with 1 monobehaviour in it until the libraries folder was deleted

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #12 on: June 14, 2014, 05:58:20 pm »
Sorry, just to be clear:

Do you mean
     PROJECT/Assets/Libraries
or
     PROJECT/Library

I only ask, because we do keep our TK2D install under PROJECT/Assets/Libraries, but deleting the Library folder seems more reasonable.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Extra sprite collection data objects and version control
« Reply #13 on: June 15, 2014, 10:46:54 am »
I mean the Project/Library folder