Saturday, November 29, 2014

Unity with Ryan Henson Creighton: 57%

OK, the code in this chapter did not work.

And I fixed it.

Even though I do not know much about the Unity engine, or UnityScript, I apparently do know how to debug, slowly, methodically: is this part working? Yes? How about this part? No? Debug.Log(), Debug.Log()... And I do know how to muck slowly through incomprehensible script reference manuals describing objects and classes and variables I know nothing about, until I find what I need.

I still don't know why his code didn't work. He said to "tag" something using Unity, and I did, and the Unity interface says it is successfully "tagged", but the script does not see the "tag". Some kind of Unity bug I guess.

I'm sure there are multiple fixes/workarounds. But I found one of them :)