hi, I’m trying to make a thing that has two arrays in an array, but there is one problem, I do not know how to use one of the arrays that is inside the other array. here’s my code!
[System.Serializable]
public class OneSet
{
public string NamesToBeFound;
public GameObject ObjectsToTrigger;
public bool StartOff;
}
public OneSet[][] Set;
// Start is called before the first frame update
void Start()
{
if (StartOff == true)
{
foreach (var Object in Set)
{
foreach (var GameObject in Object.ObjectsToTrigger)
{
GameObject.gameObject.SetActive(false);
}
}
}
else
{
foreach (var Object in Set)
{
foreach (var GameObject in Object.ObjectsToTrigger)
{
GameObject.gameObject.SetActive(true);
}
}
}
}
and it is in a larger none Serialized class
Thanks for any help;-)