Author Topic: Missing NGUI scripts when exporting projects  (Read 3030 times)

ankit khetrapal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Missing NGUI scripts when exporting projects
« on: September 17, 2013, 01:25:07 PM »
Hi NGUI Team,

I have two different projects compiled with same version of NGUI(2.6.1)now i am thinking of merging those projects so i am exporting all the content from lets say project1, but when exporting the package i am not selecting the NGUI script files as they will already be available in the other project, lets say project 2.

But when doing so i am getting missing scripts exception in the project2 on the content exported from project1.

i did some research and reached to this link:

http://www.tasharen.com/forum/index.php?topic=1301.0

which says me to enable meta data but even that didn't help.

Other possible solution which could be suggested is to include NGUI script files when exporting content from Project1 and the overwriting those when importing this in project2, i know that is feasible but that won't help my cause as i have made a lot of custom edits to NGUI scripts in the project2 and in future i am also planning to add a lot of projects to the current one.

So what is the exact solution to handle this.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing NGUI scripts when exporting projects
« Reply #1 on: September 17, 2013, 02:16:48 PM »
If you've ever copied files across without their metadata, your linkage is going to be busted. So for example if you originally copied NGUI from project A to project B just by using the Windows Explorer, then you've screwed up the linkage.

When you export a unity package, meta data is saved even if you don't have it enabled, so it works fine. When exporting a package, make sure "include dependencies" is not on.

ankit khetrapal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Missing NGUI scripts when exporting projects
« Reply #2 on: September 18, 2013, 01:06:38 AM »
yes the include dependency option is on when i am exporting the package, but still i am getting missing scripts error in project B.

if i also include NGUI scripts when creating package from project A the everything works fine but i don't want to do that as it will overwrite the custom code i have written on the NGUI files in project B.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing NGUI scripts when exporting projects
« Reply #3 on: September 18, 2013, 01:52:08 PM »
As I said, the "include dependencies" must not be on in your case.

The easiest way to check if you've messed up by copying something is to open the same meta file in a text editor in both of your projects. For example, UICamera.cs.meta should have the following GUID inside:
  1. 2a92b5d748695fd44aac9feef17ba415
If it differs, you've got a problem.

ankit khetrapal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Missing NGUI scripts when exporting projects
« Reply #4 on: September 20, 2013, 07:48:33 AM »
if i don't select dependencies then the scripts associated with the prefabs will not be exported and i don't want that to happen.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing NGUI scripts when exporting projects
« Reply #5 on: September 20, 2013, 04:48:16 PM »
Correct, and you are not supposed to be exporting older versions of scripts to begin with.

Export everything you need, leave alone everything you don't. Including dependencies is not right for what you're trying to do.