2D Toolkit Forum
2D Toolkit => Support => Topic started by: whale 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?
-
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.
-
One of our members is working on a Mac, and everyone else is on Windows.
Could that be related to the duplicate sprite collections?
-
No, that should work fine. We use macs and windows on the same project all the time.
-
I'm not certain then--the extra sprite collections seem to be originating on multiple computers.
-
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?
-
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?
-
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.
-
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?
-
No that should be OK, that implies an orphaned data object with no matching source sprite collection somewhere.
-
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?
-
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
-
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.
-
I mean the Project/Library folder