This post is mainly directed to the members of the CocosCreator development team, but everyone is invited to comment:
I am part of a team of game developers working on a large scale game. We manage our CocosCreator project in Git repositories & submodules, and we are experiencing a bug in CocosCreator whenever we merge or pull changes in Git.
After pulling or merging, CocosCreator’s AssetDB fails to properly index assets inside of the resources folder. Specifically: resources are randomly hidden from subfolders - sometimes all resources in the folder but at other times only several resource files. The only way we have found to get around the issue is to move the contents of these folders into another folder outside of CocosCreator, and then return to CocosCreator, where the AssetDB refreshes and detects the assets (but not always on the first try).
As our project has grown in size over the past 6 months this issue has become such a problem that we may have no other choice than moving away from CocosCreator. I have searched through the forum and nobody else seems to be having this issue, which is very disconcerting.
We have difficulties when doing pulls and merges as well. I typically close the creator editor before I do any git operations, as I find the assetDB does weird things if it’s open.
The other thing it might be is uuid conflicts. If you’ve ever copied a file ( and it’s .meta ) file, and renamed them in any of your subfolder/modules/etc. This will lead to a uuid conflict. The editor tries to resolve these, but you’ll end up losing information, prefab links, etc. You can try using the built in import/export tool, but I find this to be lacking as well.
You can also try reloading Cocos Creator via the Developer Menu ( cmd+R on OSX ).
In order to duplicate scenes and prefabs we copy the asset files and then allow CocosCreator to generate the associated meta files. Have I incorrectly assumed this prevents uuid conflicts?
We could alternatively drag the root nodes of prefabs to the asset library in order to generate new prefabs, but do you know how we can do the same for scenes?
Save all scene’s content as a new prefab , place it into a new empty scene and delete the prefab. A bit cumbersome, but at least it works.
It’s sad and inconvinient how CC sometimes fails to handle incoming asset changes, but if you don’t modify *.fire *.prefab and *.meta files through the file system while the editor is open, you should be fine
Hmmm… that would generate a new uuid for that asset. So that part should be fine.
And I’ve had hit and miss luck with the import/export tool. I’m having problems with duplicate uuids all over the place (projects were copied and renamed, metas and all, over and over, and now we’re trying to bring them all together ). The tools seems to resolve uuid conflicts for image assets, but fail on scripts completely.
Sounds like a job for a script. It shouldn’t be too much work to prepare something to generate new unique UUIDs and replace all instances of the old ones.
It’s getting close. I’m not sure if I’m legally able to release the tool, unfortunately. I’ll see what I can do, and if I can, I’ll be sure to make a post here.