2D Toolkit Forum

2D Toolkit => Support => Topic started by: imann on June 26, 2016, 01:27:37 am

Title: ParticleSystems rendering behind Sprites
Post by: imann on June 26, 2016, 01:27:37 am
Hi, I'm currently working on a mobile game using 2DToolkit alongside some ParticleSystem effects. I'm noticing some of my particle systems rendering behind 2DToolkit sprites in the game view, even when I adjust the z positions so the ParticleSystems are positioned in front of the sprites in the world view. Can anyone advise on this issue?
Title: Re: ParticleSystems rendering behind Sprites
Post by: unikronsoftware on June 27, 2016, 11:01:16 pm
Its possibly the shader / material that is on them.
Before that thought - try setting the sorting order (in code) on the particle, that could help sort it correctly.
Title: Re: ParticleSystems rendering behind Sprites
Post by: imann on June 28, 2016, 03:38:18 pm
I've changed the z-difference so that the ParticleSystem is definitively in front of the 2DToolkit sprites. Do you have any suggested fixes in terms of the shaders?
Title: Re: ParticleSystems rendering behind Sprites
Post by: unikronsoftware on June 28, 2016, 05:25:04 pm
I think you might have missed the bit about the sorting order...
https://docs.unity3d.com/ScriptReference/Renderer-sortingOrder.html

Try that before any shader stuff. You can switch the particle system to use the tk2d blended shaders, should sort correctly then.