To make a complete mini game, we need a script that is in charge of the whole game. The script doesn’t need a voxel object, but scripts do need to be part of an entity to run in dot big bang. And the easiest way to make an entity is to drag in a new voxel object.
Having a voxel object for the TreasureControllerScript will also make it easy to select in the world, since you have something to click. But you can always find objects in the Search for entities panel.
In this case, I used this 2D Scroll Voxel object, which you can remix here, but you can use any voxel object you want. Once the game is finished, we’re going to delete it.
- Drag any new voxel object into your world.
- Select the new object and open the Entity panel.
In the Entity section, rename the object to TreasureController.