destroy ui element unity code example Example: destroy ui element unity public GameObject panel; Destroy(panel);