Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: helmesjo on April 22, 2014, 02:07:18 AM

Title: BUG (?): UIPanel destroyed once when instantiated
Post by: helmesjo on April 22, 2014, 02:07:18 AM
To keep it short, I basically have different kinds of dialogs as prefabs, which are instantiated when displayed. When the prefab is instantiated, it will try to first destroy the panel. I can't find anything in your UIPanel-script, so I'm guessing this is another of Unitys awkward random-things that's just "the way it works". The problem though is when I also have a UIScrollView attached, which requires a panel attached. On instantiate I get of course get this:

Can't remove UIPanel (Script) because UIScrollView (Script) depends on it

and somehow the panel ends up deactivated...

Thoughts? TY!


Edit: Never mind :)
Title: Re: BUG (?): UIPanel destroyed once when instantiated
Post by: ArenMook on April 22, 2014, 05:06:55 AM
Maybe an issue with script execution order? I'm not sure, I've never seen this before. Panels don't get destroyed on instantiation. That would be very odd if they did.
Title: Re: BUG (?): UIPanel destroyed once when instantiated
Post by: helmesjo on April 22, 2014, 07:16:38 AM
Ignore this. Found deep down in some older code a fix for when NGUI didn't nest panel-alpha... My bad.