Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: kababyenoh on September 23, 2012, 10:45:06 PM

Title: Interesting referencing issue in NGUI
Post by: kababyenoh on September 23, 2012, 10:45:06 PM
Hi all,

I ran into this interesting little problem whenever I attempt to delete an instanced object in a prefab (See image below, Unity crashes on me)

http://i1109.photobucket.com/albums/h426/kababyenoh/Example01_zps926921cf.jpg (http://i1109.photobucket.com/albums/h426/kababyenoh/Example01_zps926921cf.jpg)

It appears that I may have accidentally instanced the objects and established connections between them by the looks of it.

Is there a way to break the connections or must I create a new prefab from scratch to fix it?

Thanks
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 24, 2012, 01:20:03 AM
Where is the image?
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 24, 2012, 01:35:24 AM
I've linked the image, can you see it?
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 24, 2012, 01:55:35 AM
No , i don“t see the image.
Reattach please
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 24, 2012, 01:57:31 AM
Used hyperlink this time.

Now?
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 24, 2012, 01:59:36 AM
Yes now i see the link , but the image is a black background with a withe pixel point in the center....
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 24, 2012, 02:10:31 AM
Tried it again.

http://i1109.photobucket.com/albums/h426/kababyenoh/Example01_Redone_zpsd7d7cdac.jpg (http://i1109.photobucket.com/albums/h426/kababyenoh/Example01_Redone_zpsd7d7cdac.jpg)
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 24, 2012, 02:22:26 AM
Your image is only 1 white pixel. Please check first , use attahcements options on the post repply to upload here.
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 24, 2012, 02:23:47 AM
Thank You.

How about now?
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 24, 2012, 03:01:41 AM
What are you instancing?

Can you show your instancing  code?
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 24, 2012, 08:33:15 PM
I have some screencaps from monoscript and Unity console here.

Says that I may have instanced something? What the heck ==
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 25, 2012, 04:06:55 AM
You are calling a label that is null.
use Getcomponent<UILabel>() to get the label object.
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 25, 2012, 04:08:30 AM
Alright, will give it a try.

Thank You!
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 25, 2012, 04:09:50 AM
Actually, I would like to stop the prefab from crashing. I'm guessing if it is the label that is causing the issue, is there a way to have it not call said object?

I'm no scripter, I just happened to run into this by mistake.
Title: Re: Interesting referencing issue in NGUI
Post by: joreldraw on September 25, 2012, 04:15:38 AM
Comment the line 20;
labelAreaName.text.....
//labelAreaName.text...

If you are not coder is hard to do, because you need to know if have more reference for this label and why you need this or not.

I think is a log label to show your server and port conection or something similar.
Title: Re: Interesting referencing issue in NGUI
Post by: kababyenoh on September 25, 2012, 04:32:55 AM
Alright, I'll have a coder buddy root around and see, if not worst comes to worst I'll just make the prefab from scratch.

Thanks~