// Use this for initialization void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; gameCamera = Camera.main; }
void OnDestroy() { instance = null; }