private void OnDestroy() { if (allCoinsSet != null) { allCoinsSet.Remove(this); } else { Debug.LogError("AllCoinsSet is null for " + this.name); } }
private void OnDisable() { if (activeCoinsSet != null) { activeCoinsSet.Remove(this); } else { Debug.LogError("ActiveCoinsSet is null for " + this.name); } }