Answer the question
In order to leave comments, you need to log in
How to call an array of strings that the user enters?
The user can click on the name of the array, so I get the name of the array, for example the name Products through gameObject.name, but how to display the Products array or the first word?
Something like this, but it doesn't work:
void OnClick(){
string []Products = {"prod1","prod2"}
string []SomeWords = this.gameObject.name;
string oneWord =SomeWords[1];
print(oneWord);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question