I’ve been developing a software with Unity that isn’t really a game, but more of an education software and I’ve been messing around with Arrays and Lists… But I don’t really know if this is a possibility.
But I need to know if you can reference all objects inside of an Array or a List.
if (WrittenText1.text == Names1.Name[0])
{
Person1.SetActive(true);
}
else
{
Person1.SetActive(false);
}
if (WrittenText1.text == Names1.Name[1])
{
Person1.SetActive(true);
}
**The code’s getting way too big for something that could be adjusted by something like that, if I could reference every single string object with only 1 code line. **
I have a series of Names, Actions and Places and typing such things results in their objects being turned on, or the objects doing their actions.
I don’t know if anyone knows a workaround this, or if I’m being too dreamy with programming, but either way, it’s the kind of pickle I ran into.