Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ranilian on July 19, 2012, 05:04:40 PM

Title: DestroyImmediate Error
Post by: ranilian on July 19, 2012, 05:04:40 PM
Hey Aren,

I keep getting the following:


Destroying object immediately is not permitted during physics trigger and contact callbacks. You must use Destroy instead.
Scene is being destroyed while there are hidden renderers that are using it. This is likely an editor script creating objects with hideFlags and leaving them enabled.

I follow the stack and it seems to be calling NGUITools.DestroyImmediate when I call Destroy on the gameobject that has a uilabel as a child.
Title: Re: DestroyImmediate Error
Post by: ArenMook on July 19, 2012, 05:06:03 PM
Where are you getting it? Sounds like you're trying to destroy some object from within a physics-driven callback.
Title: Re: DestroyImmediate Error
Post by: ranilian on July 19, 2012, 05:09:45 PM
Yeah I was destroying it during collision however, I found out that the widget itself had a UIPanel and that caused this error. Now I have one UIPanel as a parent of the gameobject which fixed this issue.
Title: Re: DestroyImmediate Error
Post by: winresh24 on October 01, 2012, 08:57:50 AM
How did you solved plsss explain it to me...plllssssssssssssssss....Thanks hope to your reply :)
Title: Re: DestroyImmediate Error
Post by: ArenMook on October 01, 2012, 04:50:26 PM
He already did. He said he had a panel on his widget, which is wrong. Panel should be on a parent of the widget, not on the same game object.