void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player") { Destroy(Key); KeyEnabled.SetActive(true); KeyDisabled.SetActive(false); } }
void Start() { KeyEnabled.SetActive(false); KeyDisabled.SetActive(true); }