private void Awake() { if (instance == null) { Debug.Log("CREANTE INSTANE"); instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
// Use this for initialization void Start() { scoreSingelton = FindObjectOfType <ScoreSingelton>(); text.SetText("Super!\n\nYou opened\n\n" + ScoreSingelton.instance.GetDestroyedPrestentScore() + "\n\npresents in the right order!"); }