C# SetActive GameObject Array

Hi everyone, I have a GameObject Array that I would like to have it’s SetActive set to false.But how I do that since arrays don’t have a definition for SetActive?

foreach(GameObject _obj in gameObjectArray)


there is no direct method to do that. This is the only way.

@trelobyte, if you have OnTriggerEnter, try copy the same code in this function into the OnTriggerExit function and then set it to set.Active(false); this should work.