- Home /
Shared canvas for some scenes
Most of the scenes use a common canvas and eventsystem, so I add the code DontDestroyOnLoad to them. However, other scenes, such as the main menu, will use an other canvas. What's the best practice here?
Answer by psromero6 · Aug 04, 2017 at 09:19 PM
@Adamsbridge I'm not sure what is best here. I'm sure it depends on the situation. What I do is just drop a new canvas and event system into each of my scenes, and do not have the Don'tDestroyonLoad. If you want to re-use a canvas-event system is to put them into a prefab.
I don't think I could do that. I'm making an RPG where the scenes are different areas and the canvas contains stuff like the inventory. Re-instantiating the canvas every time doesn't feel very intuitive. That would mean re-instantiating all empty item slots and filling them up with the right icon, durability meter, etc... every time you go to a new place.
Your answer
Follow this Question
Related Questions
My music duplicates and gives an error 1 Answer
How Are Scenes Handled? 2 Answers
Is there a way to activate a timer from another scene? 1 Answer
How to make a saved score destroy on load new scene 0 Answers
Fade In each level 1 Answer