Author Topic: issues with background, pause menu and other game objects  (Read 1536 times)

firestorm

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
issues with background, pause menu and other game objects
« on: March 27, 2015, 04:33:01 AM »
So im working on a 2d game and am stuck on a few things

Some questions first

1) Does every game object in the entire game need to be under the ui root and have a widget for layering?

2) How do I make gameobjects appear infront. (Example, I have some background sprites but some gameobjects seem to get lost)


things that are specific to my issues

I created a pause menu that I need to show above the other gameobjects etc in scene so to obscure peoples view. First I have a pause menu empty game object inside that i have buttons and a background. The problem is I can work out how to get the pause menu above other game objects no matter if the widget is higher than all other objects. I can also interact with the gameobjects underneath the pause menu sprite

I was having issues interacting with other game objects so any game objects that aren't apart of the ngui system I spawn on -1 z axis.

I have uploaded a screenshot of the menu disappearing even in the scene view



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: issues with background, pause menu and other game objects
« Reply #1 on: March 27, 2015, 11:07:50 PM »
1. Not necessarily under UI Root, but they must be under some UI Panel.
2. Give it higher depth. Assuming the objects' layers are set correctly, depth is all that's needed. Note that Camera's depth is most important. After that it's panel's depth, and only after that will it be widget's depth.