Author Topic: [Solved]My NGUI stopped working completely  (Read 4698 times)

webik150

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 36
    • View Profile
[Solved]My NGUI stopped working completely
« on: March 24, 2013, 06:30:25 AM »
Hi, I have been working with NGUI for few weeks, but today, when I started up unity, NGUI wasn't there. I can see the NGUI folder in Assets manager, but none of the scripts works and I cannot see NGUI button on the heading (or how is it called). Does anybody know whats the problem, or how to fix it? I have Unity 4.0.0f7 and NGUI 2.5.0.

Thanks.
Also sorry for bad English.
« Last Edit: March 24, 2013, 02:09:08 PM by webik150 »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: My NGUI stopped working completely
« Reply #1 on: March 24, 2013, 12:22:19 PM »
If you've imported again and it doesn't show the menu item, it's because some script doesn't compile at all - check the console which script isn't compiling and fix that (or comment it out temporarily). This is likely your own script, since the NGUI package you get definitely compiles.

I hope that helps.

webik150

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 36
    • View Profile
Re: My NGUI stopped working completely
« Reply #2 on: March 24, 2013, 02:08:39 PM »
Thanks. Helped. I don't know why, but it was because of ITween. There was
  1. error CS0101: The namespace `global::' already contains a definition for `iTween'
I don't know how to fix it, so I just deleted ITween, and it works again.

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: [Solved]My NGUI stopped working completely
« Reply #3 on: November 16, 2014, 07:24:56 PM »
I also ran into this problem when using other assets that define "PropertyBindingEditor" (it seems to be a common class name).  Can NGUI change the name of this class or put it behind a namespace name?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Solved]My NGUI stopped working completely
« Reply #4 on: November 17, 2014, 09:02:53 AM »
If I was to change the name of my classes every time someone created a similarly named class, I'd be changing them every single update.

I've said it before and I will say it again. It's way too late in NGUI's life span to move everything to namespaces. NGUI was created when namespaces were not supported, but now that they are moving NGUI to use namespaces will break everyone's existing projects.

I will not do it. Period.

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: [Solved]My NGUI stopped working completely
« Reply #5 on: November 17, 2014, 11:27:59 AM »
Fair enough about the namespace names... That makes sense.

This particular class is defined and then never used again in the entire asset. It seems to be an incredibly common class name. Prependinng "Ngui" to its name seems like a decent compromise.  It won't break anything because no one inherits from it, and it also allows people to use your asset in concert with other common assets without playing games with the sources they download. I totally understand your viewpoint regarding class name collisions, but I think you should consider this class for an exception given its nature.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Solved]My NGUI stopped working completely
« Reply #6 on: November 18, 2014, 05:10:28 AM »
PropertyBindingEditor is used to display PropertyBinding classes, so I wouldn't say that it's not used.

EToreo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: [Solved]My NGUI stopped working completely
« Reply #7 on: November 18, 2014, 09:34:16 PM »
Ok, let's replace "used" with "referenced".  The point I'm trying to make doesn't change, though.  I think it's reasonable for the class name to be change in this case for the reasons I discussed earlier.  It doesn't hurt anything, and it helps some people with more complicated projects out.