void Awake() { if (instance != null) { Debug.LogError("More than one BuildingShopManager in scene !"); return; } instance = this; }
private void Awake() { if (Instance == null) { Instance = this; } else { Debug.LogError("Too many instances!"); Destroy(gameObject); } }