- Home /
Partical System is not visible
Hello,
Does anyone have any idea why my particle system is not able to become visible on Top of any other game object (floor, trees, etc)? Particle alone:
Particle above some platform:
My particle inspector:
I have tried to attach a Sprite Renderer component to my particle system prefab and increased its Order In Layer to become on top of my other game plaftorms, but it doesn't seem to help. I would appreciate some explanation for this as i would like to use some particle systems i have as game animations for some monster deaths, i plan to instantiate the particle system prefab once the monster dies.
Thank in advance.
Is that a 2D game (I don't use 2D, but it has special settings, right?)
It looks like the particle system is simply behind it. So there might be nothing wrong with it at all. It's just a matter of looking up how to position 2D and 3D (particle systems are 3D) objects together.
Yes its a 2D game. i just figured something out. The particle system appears above the platforms which has Order in Layer of 0. Any other platforms which has higher than 0, it doesn't appear above them. It takes place below them, i added a Sprite Renderer component to the particle system and increased the Order in Layer to 3, but its not appearing. Any suggestions you might have or still no ideas?
Answer by smoggach · Feb 12, 2015 at 04:48 PM
It's dangerous to go alone, take this:
using UnityEngine;
using System.Collections;
public class ParticleSortingOrder : MonoBehaviour {
public int order;
public string layer;
private ParticleSystemRenderer rend;
public void Awake()
{
Set();
}
public void OnValidate()
{
Set();
}
public void OnEnabled()
{
Set();
}
private void Set()
{
if (rend == null)
rend = GetComponent<ParticleSystemRenderer>();
rend.sortingLayerName = layer;
rend.sortingOrder = order;
}
}
Also check your camera depths (particle camera may be behind another one).