Forum rules - please read before posting.

Pause background texture over the menu

Hi,

I'm wanted to add a background textures for the menus when I pause the game, so the "Pause background texture" option seemed perfect for me.

The only problem I have is that the texture is showing over the menu instead of behind, so I can't see the menu if I use this (but still can interact with it). I'm using the Unity UI prefabs given with AC that I modified myself afterwards.

Is there anything I should do to avoid that?

Comments

  • Apparently it works fine with "normal" AC menus, so I guess it's related to the fact I use Unity UI :/

    I also tried to do that by fading a sprite when the pause menu is turned on with an ActionList, but it's pausing the game before the ActionList finishes so the sprite doesn't show (even worse, it's showing when the game is unpaused as the actionList finishes to be executed)
  • Yes - the pause background texture is drawn with OnGUI, and isn't suitable for Unity UI-based Menus.

    You could instead create a "dummy" UI Menu that is simply your texture covering the full screen, have it display underneath your Pause menu, and turn it on at the same time.
  • Ok, I'll give a try with that.
  • Sorry @ChrisIceBox can you explain better the idea, i have the same problem but i couldn´t find the way to works.
  • If you're working with Unity UI Menus, then I'm assuming you're familiar with hooking up Canvas prefabs to the Menu Manager.

    I was suggesting that you create a new Menu, with no Elements, and hook it up to a new UI Canvas prefab in the same way - only this Canvas consists of a full-screen Image that serves as the background.  Make it non-clickable in both the Canvas Inspector and the Menu's Properties list, and it then won't interfere with your game other than visually.

    You can then turn it on whenever your other Menus turn on, and vice versa.  Being a Unity UI prefab, you can now play with it's sorting order to control its display relative to others.  This is done on the Unity UI side of things however - it's not something you control with AC.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.