I lost enemy

when I finished the projectile, the enemies disappeared in the tab Game (it appears in tab Scene). i tried delete enemy (spawn) and create it again, it’s not working
how I can I fix it

Check the sprites’ sort order. Looks like they may be drawn behind the background

i tried it, but it’s not bug, the enemy still dissapear


d

Can you show the camera’s inspector?

heree

I’m not seeing anything wrong. What’s the sort order of the background?

heree

are u still there?

I am. Sorry, I got busy. I can’t see anything wrong and don’t know what else to check. Can you zip your project and drop it somewhere? Then I can take a quick look and let you know what I find

1 Like

i’ve uploaded it on my github

Github? You are my hero! Getting it now

thank u, i hope u can find bug in this

OK, easy fix.
Your path is behind the camera. If you open your path prefabs, you will see their z-position is -10.40105. The camera is at -10, so these spawns are behind the camera. Change the z-position to 0 and it will be fine.

Even though this is a 2D game, Unity is still a 3D game engine. The camera is set to Orthographic which makes all your stuff flat and 2d (no perspective) but the camera needs to exist somewhere and can only see what’s in front of it. In real life, photos are 2D, but the camera that takes that photo exists in a 3D space and can only see what’s in front of it. It’s the same here

1 Like

oh, that’s so helpfull, thank a lot

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

Privacy & Terms