I have multiple panels in single scene i want to active deactive them through button click
- You will have to locate and store your panels in an array you might put them as a public field so you can add them through the inspector or you can use the GameObject.Find(“name”) however the first options is usually better for this exact purpose.
- Next you will need to iterate over the already created array of GameObjects and simply call the extension method
SetActive(false)
.