private void Awake() { if (PlantStats.instance == null) { instance = this; } else { Debug.Log("An instance of PlantStats already exists. Calling Destroy(gameObject) on the duplicate instance"); Destroy(gameObject); } }
void Awake() { instance = this; }
// Use this for initialization void Start() { PS = GetComponent <PlantStats>(); }