Of course, this isn’t optimized and would like to figure out a way to instantiate these instances within an array. Any/all help, tuts, feedback would be awesome. Still learning.
You could use an Array, which you already seem to know about. You would just declare your array like so:
GameObject [] myGameObjectArray = new GameObject[length]();
//I do not recall if you need to put the length of the array in the variable declaration so try this if you get a syntax error:
GameObject [length] myGameObjectArray = new GameObject[length]();
However if you wanted to expand or shrink that array it would be very computationally expensive. So try using a List. They are part of the .NET library (I believe its in System.Generic) and you can just call myList.Add(myGameObject); to add it to it. You can access it just like an array, using the brackets like so: myList[ index ]; Lastly if you wanted to set all of your objects inactive at once you could child them beneath an empty game object and just call setActive(bool) on the parent. That will make all of them the same regardless, and you don’t need to monkey with any loops.
// instead of 5 unique variables*
public GameObject [] options;
// to keep track of which position / index
int currCycle = 0;
// little updated logic to your cycle call.
if(Input.GetKeyDown(KeyCode.R)){
options[currCycle].setActive(false);
currCycle++;
options[currCycle].setActive(true);
if(currCycle == options.Length) currCycle = 0;