(Problem) WithSparklesVFX

So I am running into an issue with the sparklesVFX triggering when player enters the scene. Then when ball destroys block it not triggering the effect.

Hi Ian,

Is there an error message in your console, e.g., a NullReferenceException? Did you add a Debug.Log to the code block that is supposed to call the Play method of the ParticleSystem?

Hey Nina,
Thanks for your responses. Yes, no NullreferenceException. Ran a debug.log, it is being triggered, all happening yet no sparkles… :sleepy:

Are you in the Block Breaker section? If so, does the particle system appear in your Hierarchy? Is the z-position of your background set to -10?

(Solved) So it seems that my background has been the issue. It must have been blocking the view of the location of the effect. I was not having it at z -10… However now I have no background appearing in the Game even though on the editor. I am wondering, will I have to build a whole new background, seeing as how I am not understanding why I cant see my background at all anymore. Thank you for your time, Nina.

So if I remove the - from the -10 put on the z position, I get my background back and the sparkles… so in essence I fixed it, however the understanding of why… where did it go… I mean… concepts and learning are still developing… I mean, I understand layers and that because my cameras location, sparkles location, that it was set to hiding behind the rendering of my background. Probably best not to think to much on the whys of such locations and just roll with what works right?

Actually, this topic is important. You should know how renderers work so you will be able to fix typical issues like these yourself next time.

Take a look at this masterpiece:


We use the z positions like layers. If the background is in front of your particle system, the latter is not visible to the camera. If you put a sheet of paper in front of your eyes, you cannot see what is behind the sheet.

If the background is on the same z-“layer” as the camera or behind the camera, the camera cannot see /render it.

Last but not least, do not put the background and the blocks on the same z-“layers”. Otherwise, it might be that a block becomes invisible because Unity does not know which object is supposed to be rendered first. This effect is called z-fighting.

See also:

I apologize for what may have seemed like a dismissal of this concept. I unintentionally did that in my curbing of my over complication of things. Yes. It would seem that even more so in 2-d, it is another check which need to self install into self, to check, in my diagnostics of why it might not be appearing. This and set actives both seem to be in “essential first things to double check”. Again, thanks for your quick response and help in this education of ones self/journey. Lol, I totally dig your masterpiece.


what can I say, your art is inspirational!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms