I am new to Game Development. I made a menu with NGUI plugin. I have a background image in the behind of this menu. Now, I want to place my Game Scene in place of the background image. I have tried in several ways. But, Failed. Any suggestions will be highly appreciated. Thanks
1 Answer
\$\begingroup\$
\$\endgroup\$
0
You'll have to load your scene as normal, so that your menu objects and scene objects are in the same area. You'll then use culling to separate out which camera displays what objects.
So you'll want to use two cameras - one for GUI objects and another for everything else.
- Set all of your GUI objects' layer to "UI", and your GUI camera's Culling Mask to UI only.
- The GUI camera's Clear Flags should be set to Depth Only.
- The scene camera's Culling Mask should be set to everything but UI.
- UI Camera's Depth should be set to 1, Scene Camera's Depth should be set to 0.