Set up the Scene

Drag the MadderManager and MadderControllerManager prefabs from Packages > Madder Starter Pack > Runtime > Prefabs into your scene. These prefabs are Singleton classes and will persist across scene loads. These are the core components of the Madder system and are required for Madder to work with your game.

If you do not see the Madder Starter Pack folder or any other packages, they may be hidden. Click the visibility button to toggle them on.

toggle hidden package visibility

Additionally, drop the SampleGameManager, SamplePlayerManager, and MadderControllerTest prefabs into your scene. These prefabs are examples of how you might interact with the Madder system.

Here’s an example of what your scene hierarchy might look like:

Sample Scene Hierarchy

For this tutorial, we have provided a sample PlayerInput asset that has pre-loaded input actions and bindings. If you are following this tutorial with your own assets, see the Madder Controller Usage for more information on how to bind your input actions to the Madder Controller.

Examining the Sample Scripts

Before we move on, let’s take a look at what each script is doing: