Author Topic: Error occurs when i import NDATA after NGUI  (Read 4074 times)

fghjru

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Error occurs when i import NDATA after NGUI
« on: March 26, 2014, 04:36:06 AM »
Hello, i am new to NGUI. I imported NGUI 3.5.5 package in Unity, it works fine. All examples are working, and i don't receive any errors. But when i import NDATA package, errors appear:

In Unity Console
Assets/NData/NGUI/NData/NguiLocalizationKeyBinding.cs(18,27): error CS1061: Type `UILocalize' does not contain a definition for `Localize' and no extension method `Localize' of type `UILocalize' could be found (are you missing a using directive or an assembly reference?)   

So error appear at
protected override void ApplyNewValue (string newValue)
{
      _localize.key = newValue;
      _localize.Localize(); // ERROR
}

and in NguiUtils.cs
output += Localization.instance.Get(key);

When I comment this two lines, errors disappear!

fghjru

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Error occurs when i import NDATA after NGUI
« Reply #1 on: March 26, 2014, 04:37:53 AM »
How should i properly import NDATA to Unity?

realblues

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Error occurs when i import NDATA after NGUI
« Reply #2 on: March 26, 2014, 04:48:03 AM »
It' not NGUI's Issue :)

and good news Is, New NData Version Updated, no more Error now.

fghjru

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Error occurs when i import NDATA after NGUI
« Reply #3 on: March 26, 2014, 05:09:50 AM »
but i trying to solve this.

Localization.instance.Get(key);

we need to replace it with

output += Localization.Get(key);

and what should i do with

protected override void ApplyNewValue (string newValue)
{
      _localize.key = newValue;
      _localize.Localize();
}

aikitect

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: Error occurs when i import NDATA after NGUI
« Reply #4 on: March 27, 2014, 11:00:49 PM »
Also getting this issue after installing the latest NGUI and NData.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error occurs when i import NDATA after NGUI
« Reply #5 on: March 28, 2014, 01:00:00 AM »
Tell that to NData's author, not me.