- Home /
Question by
Nexus183 · May 12, 2018 at 05:59 PM ·
uicanvasdontdestroyonloadpanel
How to hide UI canvas between scenes,UI Panel staying visible between scenes
Hello All,
Tried searching online but couldn't find an answer between all the other UI canvas issues people are having.
I've created a UI menu that comes up when pressing escape, one of the options is 'Level Select' which takes the character to a word select scene that is interactive and you can walk around etc. Though because the UI canvas is set to 'DontDestroyOnLoad' the menu stays visible unless you press escape again.
What would be the best way to auto hide the canvas between scenes?
Thanks in advance, Brock.
Comment
Answer by Nexus183 · May 14, 2018 at 02:21 PM
Would there be an easy way to make this a singleton?
public GameObject pauseMenuUI;
public GameObject rootCanvas;
private void Awake()
{
DontDestroyOnLoad(rootCanvas);
}