void Awake() { if (persistantScript != null && persistantScript != this) { Destroy(gameObject); } else { persistantScript = this; DontDestroyOnLoad(gameObject); } }
void Start() { ps = GameObject.Find ("Persistant").GetComponent<PersistantScript> (); }