Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: woshihuo12 on August 19, 2014, 08:36:05 PM

Title: ngui3.7.0 unity4.3.4 empty project, meet error..
Post by: woshihuo12 on August 19, 2014, 08:36:05 PM
Assets/NGUI/Scripts/UI/UICamera.cs(442,46): error CS1061: Type `UnityEngine.GameObject' does not contain a definition for `GetComponentInParent' and no extension method `GetComponentInParent' of type `UnityEngine.GameObject' could be found (are you missing a using directive or an assembly reference?)

the newest ngui can't support unity4.3.4?
why?
and how can i know witch new version ngui can support unity4.3.4?
Title: Re: ngui3.7.0 unity4.3.4 empty project, meet error..
Post by: ArenMook on August 20, 2014, 03:14:38 PM
Change that line to  "return NGUITools.FindInParents<UIRoot>(hoveredObject) != null;" and it will compile.

NGUI has been published with unity 4.5 for the last few updates, actually. My main hard drive died a few weeks back and I had to get a replacement. Unity 4.3 died with it.

P.S. You will need to replace GetComponentInParent in a few places in UICamera to get it to compile in 4.3.
Title: Re: ngui3.7.0 unity4.3.4 empty project, meet error..
Post by: chaerf on September 20, 2014, 03:45:43 PM
what about parent.getComponent<'script'>()????
Title: Re: ngui3.7.0 unity4.3.4 empty project, meet error..
Post by: ArenMook on September 21, 2014, 09:01:39 AM
?