// Start is called before the first frame update void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; }
void OnDestroy() { instance = null; }