|
I've been debugging a few scripts that work together great written in JavaScript, but when I attempt to use their Boo counter parts, I find that parts of them simply will not run. That is, the called functions will not respond, but there is no error in the log. This seems to happen when I have a
Basically, the script won't even touch ApplyDamage(). If I put a print statement inside the function, it gives me nothing in the console. Anyone have any ideas? Thanks!
(comments are locked)
|
|
Most likely it's the same as c# - you'll need to use StartCoroutine(ApplyDamage()); to call the function, as js is the only language which does that implicitly I am pretty certain it has something to do with this. I got it to work by importing System.Collections and setting the definition as an IEnumerator.
Apr 18 '11 at 03:57 AM
Ves
(comments are locked)
|

This is covered in the docs: http://unity3d.com/support/documentation/ScriptReference/index.Coroutines_26_Yield.html