Hello Guest

Author Topic: Problem with building collections in a separate project  (Read 5527 times)

Evil-Dog

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Problem with building collections in a separate project
« on: October 31, 2013, 03:51:41 pm »
Hey there
Per your suggestion, I started building my huge sprite collections in a separate project and only copying the Data folder in my main project.  Initially it seemed to work but then I had problems. When I create a new collections in the collections project and copy them over, I can't see the collections in the animation or sprite inspector.
Meta files are ON on both projects.   I thought maybe I had to copy the metafile of the data folder as well but that didn't help either.
And also have that issue where it seems like the collection list is having some issues
http://www.evildogserver.com/share/tk2dUiGlitch.jpg

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem with building collections in a separate project
« Reply #1 on: October 31, 2013, 03:54:35 pm »
You shouldn't need to copy the meta files of the folder itself (but you need to for everything inside). Check a few things:
1. Test the materials, make sure they are all linked correctly.
2. Click on the sprite collection data object (pick one that isn't appearing in the list), make sure it is correct, check it with debug mode on in the inspector - make sure all the links are valid.

The ---s in the list indicate sprite collections that can't be found. Its not a glitch in the UI, but rather an indication thats somethings gone wrong.

Evil-Dog

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Problem with building collections in a separate project
« Reply #2 on: October 31, 2013, 04:42:16 pm »
A few problems I'm seeing for the new collection, Sprite Definitions doesn't have anything in it, size 0, the collections that work have all the sprite definitions in there.
The checkbox Valid Material Ids is unchecked when it should be checked, it indeed didn't have anything in the materials array
As far as the missing collections, I've deleted old ones but they all seem to be there except the new one I'm trying to create.
Thoughts?

With more tests, modifying a collection and putting the new data folder in the main project seems pretty shabby, caused a crash, then the texture was corrupted and unusable, finally got the changes in an existing collection to work by doing a few project restart, I think what did it is recopying the data folder when the main project was closed.
« Last Edit: October 31, 2013, 09:00:38 pm by Evil-Dog »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem with building collections in a separate project
« Reply #3 on: November 01, 2013, 12:29:32 pm »
If it happens again - check the meta file on the old & new projects, make sure they are exactly the same. Alternatively, try "export unity package" to export from project 1 & import into project 2 if you're having problems copying.

Evil-Dog

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Problem with building collections in a separate project
« Reply #4 on: November 01, 2013, 11:05:04 pm »
Just to be clear, by fiddling around, the modifications in an existing collections finally copied over, but I was never able to have access to the new collection created in the separate project.
I will try the unity packages for that

Evil-Dog

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Problem with building collections in a separate project
« Reply #5 on: November 01, 2013, 11:21:34 pm »
Using a unity package allowed to import the new collection while keeping all its references intact (material, sprite definitions, etc), which copying doesn't do properly for me.  However, I had to run "Rebuild Index" to see the new collection in anims and sprites.  That's normal isn't it?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem with building collections in a separate project
« Reply #6 on: November 01, 2013, 11:29:25 pm »
Yes, rebuild index is normal.

Evil-Dog

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Problem with building collections in a separate project
« Reply #7 on: November 02, 2013, 04:22:54 am »
I believe this will be a good solution for now :D  Thanks for all your help!