0
votes

I've created a 3D game with 10 levels (10 scenes) with unity 2018. In the first scene I have added the canvas which displays the menu on click of ESC button.

But the problem is the menu is displayed only in the first level(scene). For the menu to display in other scenes I need to copy the same menu canvas to other scenes as well.

I am looking for a technique to have a common menu canvas for all the scenes without repeating it in all the scenes. Is there any way to do it?

1

1 Answers

1
votes

Make it persist using DontDestroyOnLoad

void Awake()
{
     DontDestroyOnLoad(gameObject);
}