private void Awake() { // singleton-type setup if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } // Place all objects sent to Destroy scene on DontDestroyOnLoad DontDestroyOnLoad(allCubes); DontDestroyOnLoad(allBoundingFloors); DontDestroyOnLoad(allEggs); }
// Use this for initialization void Start() { gameManager = BuildGameManagerScript.instance; }