Here is my code in which the identifier problem causes.
for (int i = 0; i < buttons.Length; i++)
{
Text[] = buttons[i].GetComponentsInChildren<Text>();
}
Unknown identifier: This type of error could mean that Unity does not know the variable that you are referring to and it is expecting an Identifier. This might be due to these reasons:
Note: The names of all variables and functions are case-sensitive, just using an incorrect case, will assume that you're referring to another variable.
Try this:
for (int i = 0; i < buttons.Length; i++)
{
Text[] texts = buttons[i].GetComponentsInChildren<Text>();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.