Author Topic: NGUI Export/Import problem  (Read 7544 times)

Den

  • Guest
NGUI Export/Import problem
« on: August 08, 2012, 12:30:54 PM »
Hello Everyone!

Here is my problem: We had 2 Unity projects and two different NGUI package version on two computers. Then we updated NGUI up to version 2.1.2 on each machine. When I exported package with NGUI scripts from one project(on 1st machine) and imported it to another project(on another machine), I found all references to those scripts missing in objects from the package. As far as I understand, this happend because all guids to NGUI scripts in imported objects are differ from guids to NGUI scripts on current machine and equals to  guids to NGUI scripts on machine, wich I export package from.

Is there any solution to this problem, somehow change guids somewhere, for example?
Thanks in advance and apologies for my bad English ans probable misspellings :).

PhilipC

  • Guest
Re: NGUI Export/Import problem
« Reply #1 on: August 08, 2012, 01:22:58 PM »
Why are you exporting NGUI from one project and importing into another? Why not just import NGUI directly into each project?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Export/Import problem
« Reply #2 on: August 08, 2012, 01:46:00 PM »
Missing scripts are caused by missing metadata. You need to import the NGUI from the unitypackage into each project. An alternative is to go to editor settings and enable metadata, then copy everything over, including the (now exposed) metadata files.

Vlad

  • Guest
Re: NGUI Export/Import problem
« Reply #3 on: August 08, 2012, 03:21:58 PM »
>Why are you exporting NGUI from one project and importing into another? Why not just import NGUI directly into each project?
It is not NGUI we are exporting/importing but interfaces package. We have lots of windows in one project (a) - that was created wih NGUI 1.6 and then upgraded to 2.1.2 commercial. And another project (b) that have some interfaces (created with NGUI 2.1.2 free and then upgraded to commercial version). We export that windows to package and then try to import in project (b). But all scripts became missing since GUIDs of NGUI scripts from project (a) differs from GUIDs of NGUI scripts in project (b) (UIAtlas, UIButtin etc. all are missing with all parametrs). Here is a situation.

Vlad

  • Guest
Re: NGUI Export/Import problem
« Reply #4 on: August 08, 2012, 03:26:51 PM »
Update: everything works fine if we import that packeage with windows to third project that was also created with NGUI free 2.1.2. Can we somehow change GUIDs of NGUI scripts in first project so we can easily update windows in all projects (move some buttons change some colors then export to packege and import this changes to another one)?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Export/Import problem
« Reply #5 on: August 08, 2012, 03:53:57 PM »
You need to use a versioning system like Git or SVN, and you need to enable metadata as I suggested. Without it you're bound to lose references.

GUIDs of all NGUI scripts in free and full version match, or upgrade wouldn't be possible. If yours don't, then you may have broken things by copying files (instead of transferring via unity package) at some point.