Hello, I’m making a 2D game where I instantiate a bunch of missiles. Problem is with my pause panel. When I pause the game, it uses SetActive() to enable a panel. But the missiles can be seen on top of the panel. Other game objects in the game do not do this. The only difference between the missiles and other game objects is that the missiles are instantiated. So far I have tried,
- Putting different “Order in Layer” for the Panel canvas and the missiles (But in the same “Sorting Layer”)
- Putting different “Sorting Layer”. This really messed up my scene. Other game objects will show the same problem.
- Changing the missiles’ (prefab) and their spawn points’ z position to 0.
- Putting a canvas component in the panel and setting the sorting order and sorting layer.
- putting the camera (Orthographic) far away and using different render mode for the canvas. Ideally, I prefer “Screen Space - Camera” since its an android game.
Nothing worked. On top of that while fiddling around with these settings something happened and the buttons on my panel stopped responding. I had to create the entire canvas again.
I am stumped. Any help would be much appreciated.
Thanks in advance.