I have created a level01 scene and a Inventory scene.
And it just dawned on me, If I create more Level scenes Level02, Level03, etc… and have a button to take me to the Inventory scene, How would I get back to the scene I was in?
For example I beat level02 which takes me to Level03 and I go to the Inventory scene How would I get back to scene level03?
Anyone have any ideas? or should I be doing it different?
Do not create the inventory as a scene - make it as part of each level. You can create a prefab of the inventory stuff and load it when needed on the fly without leaving the current scene.
As you already have your inventory scene: create an empty prefab and drag’n’drop all the stuff from that scene into this prefab file (must be located in a directory names ‘Resources’)
Then - if you need to show the inventory - load this resourve via
Another way is to use DontDestroyOnLoad(inventory) once you switched back to the inventory scene. If you go back to your level scene the inventory gameobject will still be there. However, I prefer the first way.