Answer by Graham Dunnett
`troop` is decremented down to zero, when your "End of the loop" is printed. This code is then executed every time `LateUpdate` is called.
View ArticleAnswer by Graham Dunnett
The suggestion I would make is to spend a little time reading documentation: http://docs.unity3d.com/ScriptReference/MovieTexture-loop.html I believe the change shown on this documentation page should...
View ArticleAnswer by Graham Dunnett
`Resources.Load()` only looks in the Assets/Resources folder. The docs: http://docs.unity3d.com/ScriptReference/Resources.html is pretty clear on this.
View ArticleAnswer by Graham Dunnett
Read up on what brackets `(`, `)` and braces `{`, `}` are for. Your `OnMouseExit` function is written badly.
View ArticleAnswer by Graham Dunnett
We are (slowly) updating them. Maybe use 4.x if you are having problems with 5.x. The lessons you learn will be useful for all Unity versions.
View ArticleAnswer by Graham Dunnett
Your line 27 is faulty. Looks like you want to check if one of two things are true. See: https://msdn.microsoft.com/en-us/library/5011f09h.aspx to learn more about `if` statements. Search for...
View ArticleAnswer by Graham Dunnett
The `Mesh` documentation tells you how you can create a new mesh. If you are changing the number of vertices, or how triangles are formed from the verts then you'll need to create a new one. If you...
View ArticleAnswer by Graham Dunnett
Reading the documentation is pretty helpful: http://docs.unity3d.com/ScriptReference/Application.LoadLevel.html
View ArticleAnswer by Graham Dunnett
I find the solution when I perform a search. http://unity3d.com/search?refinement=answers&gq=CS0116
View ArticleAnswer by Graham Dunnett
Different platforms apply different script requirements. WSA use .Net. Your line 79 uses a variable that isn't declared anywhere. Maybe start the line with the class.
View ArticleAnswer by Graham Dunnett
As you'll know, NullReferenceException means that you are accessing a variable that doesn't exist. Since in your case you are accessing an Array, I'd imagine that the array hasn't been created. So...
View ArticleAnswer by Graham Dunnett
Start by visiting the Learn section of the Unity website, and watch some tutorials.
View ArticleAnswer by Graham Dunnett
void Update() { if (playerScore>499) currentHealth = fullHealthAmount; }
View ArticleAnswer by Graham Dunnett
See: http://docs.unity3d.com/Manual/ControllingGameObjectsComponents.html
View ArticleAnswer by Graham Dunnett
Drop your key testing code inside a function called `Update()`.
View ArticleAnswer by Graham Dunnett
`transform.GetChild()` will let you get one of the children on the GameObject (Canvas in your case.) Once you have the transform, you can use it's `gameObject` member to get the GO, and then it's...
View Article