Change value of array on start
Is there a way to change the value of an array, when passing it to a function in start?
So say:
void Start()
{
Test(new string[3] test);
}
void Test(string[] array)
{
print(array[0]);
print(array[1]);
print(array[2]);
}
And in the start function, also change the values, so I can change them in script, instead of in the inspector?
Comment
Answer by vintar · Jan 16, 2016 at 12:14 PM
maybe like this :
string[] test;
void start()
{
test = new string[3];
Test(test);
}
$$anonymous$$aybe I didn't explain what I needed well enough. I want to change the value.
So say test[1] = "test1";
But in the start function, so I test array isn't blank.
Your answer
