Minimal requirements for a scene
The asset contains two minimal scenes, that you can use as a reference of what’s needed for a scene to work. Both are mini games, so parts of what they contain can be removed. Here’s what’s absolutely needed (unless you make changes to the code of course) :
- Game Manager : You need a gameobject with that script on it. It handles the time scale (how fast your game is going), the score and the lives system. It’s also responsible for pausing the game.
- Input Manager : This object will handle input (whether it’s touch, mouse, keyboard or gamepad). Do not remove it, unless you’ve planned to use an external input solution. By the way, if you’re considering another input solution, have a look at Nice Touch
- Level Manager : This object handles all your level’s “rules”. It’s in charge of spawning the player(s), so you need to feed it a starting position, an array of PlayableCharacters (usually just one, but you can have more than one if you want). It also handles how much points you gain per second. You can set it to zero if points are collected for example. It also defines bounds. Bounds are invisible boxes used for two things : object recycling and player death. Via the inspector, you can define these bounds, and you’ll see a red box (death bounds) and a yellow box (recycle bounds). Adjust them to your asset’s sizes and level gameplay. If your player gets outside of the red box, it’ll die. If spawned poolable objects get outside the yellow box, they’ll get recycled. You can also define the level’s speed, intro and outro fade durations, and start countdown settings. Finally, the Level Manager is also where you decide on your level’s control scheme. You can read more about it in the Input section.
- Main Camera : as the name implies, this camera is in charge of rendering your scene.
- Starting Position : a simple transform, that you need to feed to the Level Manager’s inspector, and that will be used at the start of your game to instantiate your player.
Optional elements :
- UI Camera : you may want to modify it, or get rid of it, but this handles the display of the current lives, the pause button, and the current level’s name.