Hello Guest

Author Topic: Never ending "Rebuilding Index"  (Read 10057 times)

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Never ending "Rebuilding Index"
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #1 on: July 14, 2014, 10:42:18 pm »
What happened to cause it? Did you copy your project using dropbox, what does the 2D Toolkit integrity checker say when you run it?

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #2 on: July 14, 2014, 11:25:58 pm »
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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #3 on: July 14, 2014, 11:39:11 pm »
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.

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #4 on: July 15, 2014, 04:28:02 pm »
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:


thanks
« Last Edit: July 15, 2014, 04:33:11 pm by rxmarcus »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #5 on: July 15, 2014, 04:40:44 pm »
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:

Code: [Select]
[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.

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #6 on: July 15, 2014, 05:03:13 pm »
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?
« Last Edit: July 15, 2014, 05:05:08 pm by rxmarcus »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #7 on: July 15, 2014, 11:12:43 pm »
Create a new script in a folder called Editor. Replace the contents with this.
Code: [Select]
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.

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #8 on: July 16, 2014, 03:36:38 am »
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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #9 on: July 16, 2014, 09:33:10 am »
Hmm... if your project is small enough send me a repro at support at unikronsoftware.com. There must be something left over somewhere...

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #10 on: July 16, 2014, 05:48:48 pm »
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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #11 on: July 16, 2014, 09:09:28 pm »
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.

rxmarcus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Never ending "Rebuilding Index"
« Reply #12 on: July 16, 2014, 10:47:39 pm »
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.