π§Prefab structure
How to navigate in UI System and setup canvases properly
Base prefab is UI. It will hold all core UICanvasControllers runtime (in prefab there shouldn't be any canvases):

How to add UI prefab to scene
You need to replace it under SceneUI object in hierarchy (under _x_Scope of scene with name x):

If you want to activate your UI object on scene start. Select SceneUI object and set Canvas To Activate link to your UI object in scene.
MainMenuCanvas
Is what should be in Menu scene. You can put in MainMenu more UICanvasController and switch between by MainMenu UICanvasController (for example MenuSettingsCanvas, SkinSelectCanvas and etc).
GameCanvas
GameCanvas is main canvas of core gameplay of your game, here should be core game elements (health bar, joystick and etc).
How to setup GameCanvas

So you need to change content of each State (window).
How to call PauseState by onClick button event
You need to open GameCanvas prefab and then select btn where you want open Pause window from and add to btn onClick event, then drag and drop GameCanvas object to btn event and choose GameCanvas.TogglePause(float) method + set valuse of fade duration (transition).

Last updated