- Home /
GameOver: Scene vs UI
What would you prefer or is more elegant ?
Create a new scene for GameOver screen, with buttons and message, and where you die or win, through a script open that scene. Pros: One scene for the hole game. Cons: Loading time.
Or add a ui in every scene like HUD Display or pause menu. Pros: Not loading times. Cons: Repeat the menu in every scene.
Im in a 3d game.
So what method is recommended or best practice ? ps: Pros and cons are my thoughts, but im a newbie in unity... ;)
If its a complex menu do it in a different scene, if its a menu displaying some text and puntuation do it in the same, if you have to use it in all scenes i would create a different scene since build size would also be affected.
Answer by tormentoarmagedoom · Jan 21, 2019 at 10:10 AM
Good day.
I recommend you to make it via Canvas for "Pros: Not loading times".
BUT you can do it without making the canvas in each scene, you can simple create a panel for Canvas and save it as a prefab. So in each scene when its gameover, you disable all elements from the canvas of that scene, and instantiate the GameOver panel in that canvas.
Whith a simple script to detect the level you are and/or the next level, you will have a fast gameover canvas for all scenes.
Bye!
Thats a nice approach but i have recently seen people having issues in the last unity version when working with big UI prefabs, (not sure if because of the new prefab workflow), people complaining about 1 $$anonymous$$ute loadtimes.
Your answer
Follow this Question
Related Questions
Menu works in stand alone but not in Game view in Editor 0 Answers
Basic question about creating a menu 1 Answer
Click Screen To Access Hidden UI Menu 0 Answers
Buttons on menu prefab showing on scene view but not in game 0 Answers
ui panel disappears after showing for few seconds ?(problem) 1 Answer