Author Topic: Word Game Builder / latest NGUI (2012 Apr 14 - v2.0.0c)  (Read 4807 times)

goat

  • Guest
Word Game Builder / latest NGUI (2012 Apr 14 - v2.0.0c)
« on: April 14, 2012, 06:34:42 PM »
OK, so I bought World Game Build and installed and it has the demo version of NGUI which I installed.

I installed NGUI (paid).

Oops, doubly defined variables and such.

So I delete all Word Game Builder assets. OK. I delete all NGUI assets. OK.

I install Word Game Builder and uncheck the NGU demo part on import.

I install NGUI and it gos OK except I haven't even done anything and Unity complains of this:

Assets/NGUI/Scripts/Internal/Localization.cs(83,67): error CS0117: `Resources' does not contain a definition for `Load'

// Not a referenced asset -- try to load it dynamically
TextAsset txt = Resources.Load(value, typeof(TextAsset)) as TextAsset;

So, it's true. I haven't localized anything in this game yet.

So how do I 'fix' this error before I get ready to localize (that is so that it doesn't appear on NGUI import into an existing project)?

Just to be clear...this error also happened the first time I imported NGUI but I thought the error then was to do to being installed concurrently with the NGUI from Word Game Builder.


...

OK, I noticed that the NGUI menu is missing at the top. So I think deleting assets from the Heirarchy wasn't quite enough. I just go back to a copy of the game and install NGUI and Word Game Builder in the clean copy. I don't want to fiddle around in the Unity Library folder to figure out what is wrong.

...

So...asset management being what it is in Unity creating a clean project and reimporting the game (it's bundled as an asset) fixed the problem.

No localization error and both the NGUI & ThinkSquirrel menus are at the top.

I think I should add to my Unity wish list at 'Project/Asset Uninstall' in the same way you can do pkgrm, rpm, or uninstall in various OSes.
« Last Edit: April 14, 2012, 07:17:05 PM by goat »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Word Game Builder / latest NGUI (2012 Apr 14 - v2.0.0c)
« Reply #1 on: April 14, 2012, 10:05:28 PM »
If you have errors, then NGUI menu won't show up. Unity stops the compilation on errors.

Resources.Load is a Unity function, it's a part of UnityEngine.Resources class. It sounds like World Builder defined its own Resources class, which quite obviously conflicts with Unity's. You should contact the author and have him rename the class because that's an error on his part.

Btw the correct steps to import NGUI into a project with the free version is...

1. File -> New Scene
2. Delete the NGUI folder
3. Import NGUI from the full version