Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: rain on May 08, 2012, 11:15:04 AM

Title: Spirtes and Particle systems
Post by: rain on May 08, 2012, 11:15:04 AM
Hi!

I have a main menu which consists of a sprite for background, a sprite for the game's title bar, a few buttons and a particle system.
The setup in terms of Z coordinates look like this: Camera-> Buttons -> Title bar -> Particle system -> Background.

My problem is that the particles emitted by the Particle system sometimes "disappear" for a while, then reappear randomly. It's like NGUI can't decide whether to draw the sprites behind the particles or ahead of them. For a few frames, it draws behind the particles, then for a few frames it draws ahead of them.

Is there any way to fix this?

Ps: I'm using the latest version of both NGUI paid version and Unity Pro iOS.

Regards
Title: Re: Spirtes and Particle systems
Post by: ArenMook on May 08, 2012, 11:48:39 AM
Particles tend to move, so their "center" also moves. Since you have the particle system in the middle of your UI, which I assume uses one panel / atlas and gets bundled into the same draw call, my guess is that's exactly what's happening -- Unity can't decide which one is supposed to come first. Move the particle system forward or back some more, or separate the background from the rest of your UI by adding an extra panel.