Hello Guest

Author Topic: Constantly "Rebuilding Index" - Probably VC related  (Read 22019 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #15 on: April 17, 2013, 03:29:12 pm »
How is this loaded at runtime? Just tk2dSystem? Or is this specific case loaded by any other means?

aegzorz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #16 on: April 17, 2013, 03:55:43 pm »
It is loaded through tk2dSystem yes, like this:

tk2dSpriteCollectionData collection = tk2dSystem.LoadResourceByName<tk2dSpriteCollectionData>( collectionName );


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #17 on: April 18, 2013, 09:42:11 am »
I'll investigate that.

hitorijanai

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #18 on: June 04, 2013, 08:57:48 am »
So do you have a workaround for this? I'm having the same problem like Aegzorz has said..

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #19 on: June 04, 2013, 09:52:57 am »
This should be fixed in tk2d 2.0. What version are you working on?

BTriana

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #20 on: July 18, 2013, 05:42:17 pm »
This should be fixed in tk2d 2.0. What version are you working on?

I am currently using tk2d 2.0 and I am experiencing the same problems mentioned in this post.

Just to restate:

-Clicking on some elements with a tk2dsprite in the inspector (both at runtime and not) causes Unity to enter a frozen state.  A popup appears saying "Rebuilding Index" with a progress bar that runs indefinitely.  I haven’t fully isolated why it’s only some of the tk2dsprites that cause this, but I will post an update when I do.

I have attempted to manually rebuild my indices through the 2D Toolkit panel in Unity, but this doesn’t change the behavior I mentioned above.

tk2d is a great piece of software, but this particular issue is a huge block to my current work flow.  Debug printing transform values for tk2d elements is too slow to implement my tasks (GUI).

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #21 on: July 18, 2013, 05:56:06 pm »
We've improved the code yet again in 2.1 - when it does this it usually meant it couldn't find something it expected to find in the project. I.e. it rebuilds the index expecting to find something in the next interation, but then it doesn't for some reason or other and goes into this infinite loop. I've changed the behaviour so it fails a bit more elegantly, i.e. simply displays a "-" when it can't find something after one attempt at rebuilding the index.

If you can create a repro case, I can almost certainly fix it for you. I've found more than one case of random weirdness so far.

I don't understand this bit: "Debug printing transform values for tk2d elements is too slow to implement my tasks (GUI).".

Goepfie

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #22 on: July 19, 2013, 03:18:00 pm »
Had a similar Problem today.

Using SVN with several Coders. One Working Copy changed the *.meta of a series of Sprite Collections (Don't know why). Turns out, for some reason all guid's in there have been changed. I triggered a rebuild to correct the mess and it seemed to work, but if you now selected any sprite and tried to change the SpriteCollection the Rebuilding Index Loop occurred. Only solution was to revert the to original Meta-Files.

We are using 2.1 beta 2. Sadly I can not provide you with an repro-project, because it currently exceeds 2 Gigabyte and contains sensitive data.

Maybe this helps clarifying issues like that.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #23 on: July 19, 2013, 06:50:53 pm »
What meta files did it change in total? It should NEVER change meta files for any existing assets :( If GUIDs are broken, then this will inevitably break - and theres more stuff broken than just the index....

Mozgoid

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Constantly "Rebuilding Index" - Probably VC related
« Reply #24 on: June 13, 2014, 12:55:01 pm »
Hello, may be my problem and it's solution will help somebody.

Situation:
In our game we had levels that full of various objects(sprites) that placed everywere. I have xml file that converted from psd file. This file have names and positions of objects. My task was write a script that reads that file and place right sprites in right positions. All this must be done in editor mode, and created objects will saved as prefab. Important : we defined platform specific sprite collections, for 1x and 2x platforms.

What i done:
Script has reference to tk2dSpriteCollectionData. He read sprite name from xml; find sprite collection that has definition of sprite with readed name; create  a sprite with right collection and name; add it to the scene.
Here structure of folders where placed sprite collections:
US/US_Objects_1_Data/US_Objects_1@1x_Data/US_Objects_1@1x  (generated tk2dSpriteCollectionData)
US/US_Objects_1_Data/US_Objects_1@1x_Data/atlas0
US/US_Objects_1_Data/US_Objects_1@1x_Data/atlas0 material
US/US_Objects_1_Data/US_Objects_1@2x_Data/US_Objects_1@2x  (generated tk2dSpriteCollectionData)
US/US_Objects_1_Data/US_Objects_1@2x_Data/atlas0
US/US_Objects_1_Data/US_Objects_1@2x_Data/atlas0 material

US/US_Objects_1_Data/US_Objects_1  (generated tk2dSpriteCollectionData)
US/US_Objects_1_Data/US_Objects_1@1x (generated tk2dSpriteCollection)
US/US_Objects_1_Data/US_Objects_1@2x (generated tk2dSpriteCollection)

US/US_Objects_1 (tk2dSpriteCollection)


Problem:
My script must have reference to tk2dSpriteCollectionData.
If I give him reference to US/US_Objects_1_Data/US_Objects_1 then it can't find any sprite.
If I give him reference to US/US_Objects_1_Data/US_Objects_1@1x_Data/US_Objects_1@1x , the script generate my map. Map look fine, but infinite "rebuiding index" starts when I select one of objects. Anyway I don't sure is it good to use platform specific data (US_Objects_1@1x) for generation

My solution:
Before generating a map I deleted platform 2x from sprite collections. And my folders became like this:
US/US_Objects_1_Data/US_Objects_1  (generated tk2dSpriteCollectionData)
US/US_Objects_1_Data/atlas0
US/US_Objects_1_Data/atlas0 material
US/US_Objects_1 (tk2dSpriteCollection)

In script I give reference to US/US_Objects_1_Data/US_Objects_1.  And generate map. Everything looks fine now. And now I can select any of generated objects. I save this as prefab. And after that I add platform 2x to sprite collection. As result I get generated map that uses platform specific sprites.

May be all this is very specific, but I hope I help  somebody. Sorry for my English :)