2D Toolkit Forum
2D Toolkit => Support => Topic started by: rxmarcus on July 14, 2014, 04:30:36 pm
-
I've searched the forums and seen many people in the past have the issue of "Rebuilding Index" appear and cycle for infinity, but haven't found a solution for myself.
For the first time in my project I'm trying to create an sprite animation using a sprite sheet.
When I create a new SpriteAnimation, Open Editor, and choose "Create -> New clip", the Rebuilding Index message appears and continues forever. Unity displays the error "Unable to find sprite collection. This is a serious problem." I just updated 2DToolkit to the latest version today, but it did not help. Also I do use SVN, if that makes a difference.
Any help would be appreciated.
-
What happened to cause it? Did you copy your project using dropbox, what does the 2D Toolkit integrity checker say when you run it?
-
To be honest this is the first Sprite animation I've attempted to create in my project, so I haven't seen the issue until just now. Doing normal static sprites with sprite collections is working fine. I ran the integrity checker and it says its fine.
-
Try rebuilding the index, and see if that helps? Otherwise expand the -tk2d / sprite collection index object, and see if there are any weird / empty looking ones in there. It looks like something is corrupted in the project.
-
None of those ideas helped unfortunately. However I opened up the ~2dtk collection as you mentioned, and there are lots of items in the list just called "Element 46", "Element 52" etc. Which do not have a name when you click on them, and appear empty.
Perhaps these are corrupt as you mentioned. If thats the case, do you know how I can clean those up?
I just deleted the ~2dtk collection file, and then did a "Rebuild Index". It came back but has all those strange elements again....
Here is an image of what I'm seeing in regards to those elements that seems corrupted:
(http://i559.photobucket.com/albums/ss36/rxmarccall/collectionissues_zps8e7b6b56.png) (http://s559.photobucket.com/user/rxmarccall/media/collectionissues_zps8e7b6b56.png.html)
thanks
-
It looks like there are a few corrupt sprite collection data objects in your project. We'll need to find those... The easiest way to do that is to create a new editor script to select them, something like this:
[MenuItem("Temp/SelectBrokenStuff", false, 10098)]
public static void LaunchDocumentation()
{
Selection.activeGameObject = Resources.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("b93a0e9780302e64bbb90ff6fd198f12"), typeof(GameObject));
}
Running that should select the first broken thing (Element 21), check what it is and delete if necessary. Repeat for the rest of the broken ones.
-
hmm, im not very familiar with editor scripts, would I be doing what is found here? : http://docs.unity3d.com/Manual/editor-EditorWindows.html
Or maybe a simple explination of what I need to do. Create a new script, and put that code in it?
-
Create a new script in a folder called Editor. Replace the contents with this.
using UnityEngine;
using UnityEditor;
using System.Collections;
public class SomeEditorStuffZ19283 {
[MenuItem("Temp/SelectBrokenStuff", false, 10098)]
public static void LaunchDocumentation()
{
string guid = "b93a0e9780302e64bbb90ff6fd198f12";
Selection.activeGameObject = Resources.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid), typeof(GameObject)) as GameObject;
}
}
Replace guid with the guid of the thing you want to select, i.e. one of the broken ones.
-
Ugh..... cleaned up all of those sprite collections, still having the same problem. Time to just use Unity's new 2D stuff in 4.3 I suppose.
-
Hmm... if your project is small enough send me a repro at support at unikronsoftware.com. There must be something left over somewhere...
-
Its pretty darn large at this point unfortunately. I don't see any more of those "Element" ones in my ~2dtk file, and i also did a fresh reinstall of 2dtoolkit and rebuilt the index. Really strange because the issue only appears when I attempt to create a "Clip" inside a sprite animation object.
-
Take a look at the other sprite collections, maybe there will be a hint - if theres anything else with version = 0, or 0 sprites in it. Also post a screenshot of the first item in the list.
-
Turns out there was 1 remaining collection that had a crazy set of characters and numbers, similar to a GUI for its name. I found and deleted this object, rebuilt the index and now its working!!!
thank you for your support on this, hopefully this will help others as well.