Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: josha on October 29, 2013, 12:09:38 PM

Title: problems with Version control & updating to new NGUI version
Post by: josha on October 29, 2013, 12:09:38 PM
Hi,

I'm using NGUI with a project that is also using version control. However I have a problem when I follow the update procedure from the documentation (new scene, delete NGUI, extract new version from unity package). When I open the original scene after updating NGUI this way, all NGUI script reference at the various components can no longer be found and I have to drag and drop the NGUI script files at the script location.

Does anyone have an idea why this is happening? Could this be because with version control enabled references are stored using the guids (which are also stored in the .meta files) and after updating NGUI the NGUI files got assigned new guids (since the files first got deleted)? Is there a solution?

Since my current scene uses a ton of NGUI files, dragging and dropping was no longer an option. I solved it by restoring the older version (3.0.2) from a backup and just importing the new version (3.0.3e) over the old version (and then delete UIInputValidator.cs), which replaces the .cs files but keeps the assign guid.

Regards,
Josha
Title: Re: problems with Version control & updating to new NGUI version
Post by: ArenMook on October 29, 2013, 04:43:19 PM
GUIDs come from unitypackages, so if your references get lost it implies that you've copied the NGUI folder from one place to another without including the metadata in the past. Easiest way to check is to import NGUI's examples folder and open up one of the scenes. If nothing shows up, then your metadata is broken.
Title: Re: problems with Version control & updating to new NGUI version
Post by: soofaloofa on November 28, 2013, 07:05:54 AM
I'm having the same issue :( This is for the second time and I've already went through fixing everything once. For the future, what is the best way to avoid this? Should I force serialization to binary?
Title: Re: problems with Version control & updating to new NGUI version
Post by: ArenMook on November 28, 2013, 02:56:01 PM
I keep metadata in text format myself.

Proper way to avoid this is to avoid copying NGUI files outside of Unity, and to ensure that metadata files are always shown.