- Home /
How to Show Random.Range in the Console when used in an Array?
How do you get the value from Random.Range when it's used in an array?
I have:
someString=myArray[Random.Range(0,myArray.Length)];
I try:
print(myArray);
and I Get:
System.String[]
Which makes sense, but I need to get the value from Random.Range when it pulls it from the array length?
Any help is really appreciated.
Thanks!
Comment
print(someString); ??? ...or... int i = Random.Range(blah, blah2) ; someString = myArray[i]; print(i);
... ?....???
When print(someString); is used, it prints the actual string not the value of Random.Range.