I posted this in the ‘answers’ section as well, but my questions there seem to go un-answered so I hope it’s ok to duplicate it here:
I just want to fill an array of integers with references to the original variables, so that any changes I make are also reflected in the original variables. In the example below I am copying the value of myInt into the array:
int[ ] myArray;
//this line copies the value of myInt instead of a reference:
myArray[0]=GetComponent().myInt;
In order to get a reference instead I am assuming I should use the ref keyword somewhere? I couldn’t find any examples of this…
Thanks in advance for any help!