I normally don’t come on here for small problems like this but I’ve been looking at my screen for a good hour now and i’m stumped.
Basically I have 2 arrays
Array #1 contains 4 buttons so it’s length is 4
Array #2 contains 4 “Actions” a class I created it’s length is also 4 then.
Values are set in the inspector so should not be returning the way they are the line in question is the one that add’s the listener
void QueneActions()
{
for(int i = 0; i < phrase.actions.Length; i++)
{
choices_.GetComponentInChildren<Text>().text = phrase.actions*.actionText;*_
_ choices*.onClick.RemoveAllListeners();*_
choices_.onClick.AddListener(() => ButtonPress(phrase.actions*.effectText)); //returns with error array index out of range*_
_ Debug.Log("B: " + choices*.name); //Returns without error*_
_ Debug.Log("A: " + phrase.actions*.actionText); //Returns without error*
* }
}*_