private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { if (Instance == this) { Debug.LogWarning("Already a PoolDict in scene! Deleting myself!"); Destroy(this); return; } Instance = this; }