New to Inventory System and Need Some Help with Loading a Scene

MarshyMadness

New member
I'm looking to create a door in my game that takes you to a different scene as long as you have a key in your inventory. I want to be able to walk into the trigger and have it change scenes while retaining all save data and player data. I was using https://opsive.com/support/documentation/ultimate-inventory-system/scene-transitions/ and trying to do the smart management but have no idea what I'm doing or where to start and how to make the prefab and link it to the save data or however it works. The instructions are unclear to a newbie like me, an help would be appreicated!
 
The managers refer to all the managers you need at all times in your game for all scenes.
In most medium sized to big games, you will have a scene with all the necessary scripts loaded first before anything else in the project. Unity isn't really built with that in mind, since the editor loads the current scene when pressing play. But there are open source bootstrap solutions out there.

The "example" code I give in the documentation has a more "Unity" approach, where it doesn't change any editor settings and instead simply loads a prefab with the managers before loading the scene. It has its advantages and disadvantages but its a great starting point.

The manager prefab refers to the "Game" gameobject you see in the demo scene that has all the managers for the Inventory system. To make a prefab you simply need to drag and drop the gameobject in the project window.
Then In all scenes instead of having the "Game" gameobject you replace it by a component with the example script I gave in the docuemntation.

Sometimes you may also need to Group all your scene under a single parent and disable it until the managers have finished loading.


Note that scene transition isn't part of the Inventory system, All games manages their scenes differently depending on their needs. These are just examples of different ways it can be done. But they must be expanded to work the way you want it for your game.
 
Top