Author Topic: Problems installing from unity store on mac  (Read 1423 times)

glasstongue

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Problems installing from unity store on mac
« on: May 24, 2014, 11:16:39 PM »
I've followed the Read Me for installing/reinstalling ( Create a new scene, delete the NGUI folder, reinstall from store) I don't know what else to do.

Halp?

extra info: OS X 10.9.2, Unity v4.3.4f1




Could tell me if my code is the problem or if I'm having NGUI installation issues?

I started a new project, with a new scene and installed NGUI according to the youtube guide.

My code is:

    void MainLabel()
    {
    UILabel topText = GetComponent<UILabel> ();
    topText.text = "Test";
    }


and the error it throws is:

NullReferenceException: Object reference not set to an instance of an object
spawnMultiObject.MainLabel () (at Assets/scripts/spawnMultiObject.cs:194)

I've been banging my head against the wall for 2 days now.

Also, this is the paid version of NGUI.
« Last Edit: May 25, 2014, 02:01:24 AM by glasstongue »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems installing from unity store on mac
« Reply #1 on: May 25, 2014, 05:42:34 PM »
The null reference exception points to your code, not NGUI. If it's the code you posted, then my guess is 'topText' is null, meaning you don't actually have a UILabel on the object this script is attached to.

Add some null checks...