Scene by Scene vs Resetting

I am building a bowling game, and have hit a crossroads:

I can make the pins and ball reset via:

A new scene is each frame


Each frame is set via one scene and a lot of scripts,

Which will be easier?


Use the Instantiate and Destroy functions to spawn and respawn your Pins and the Ball

here is an example script that will do this for you.

#pragma strict

var pinPrefab : GameObject;
private var currentPin : GameObject;

function ResetPins () {

	currentPin = Instantiate(pinPrefab, transform.position, transform.rotation);

function Start () {

	currentPin = Instantiate(pinPrefab, transform.position, transform.rotation);

function Update () {

To use this script create an empty game object and attach the script to it. Set the pinsPrefab variable to the prefab of your bowling pin (make one if you do not have one)

Next, create a new prefab, name it PinSpawn and drag the previously created game object onto it. Delete the object and keep the prefab.

Now you can place multiple instances of the PinSpawn prefab where the pins should be (take note they will be invisible in the editor window, but will show up in-game).

When the player’s turn is over and you want to reset your pins, simply call the call the ResetPins() function.

You could do the same thing for the bolowing ball as well, but you will most likely want to rename some variables…

hope that helps!