Answer by TMM
enemyName is not a member of a component. Its just only name. So try:enemyName = enemy.GetComponent(enemyHUD).name;And for your game performance its better to use FindGameObjectsWithTag once in the...
View ArticleAnswer by Tetrad
If Unity itself is crashing (i.e. not the game not working), make sure your property isn't causing an infinite loop.This will cause unity to break:string enemyName { get { return enemyName; } //...
View ArticleAnswer by skovacs1
General problems that could be omissionsYou never close your OnGUI.You may have just omitted from your included code, but there are two immediate problems that I see with this script:1 What are...
View ArticleAnswer by TMM
enemyName is not a member of a component. Its just only name. So try:enemyName = enemy.GetComponent(enemyHUD).name;And for your game performance its better to use FindGameObjectsWithTag once in the...
View ArticleAnswer by Tetrad
If Unity itself is crashing (i.e. not the game not working), make sure your property isn't causing an infinite loop.This will cause unity to break:string enemyName { get { return enemyName; } //...
View ArticleAnswer by skovacs1
General problems that could be omissionsYou never close your OnGUI.You may have just omitted from your included code, but there are two immediate problems that I see with this script:1 What are...
View Article