- Home /
Question by
Gameeeee24 · Dec 05, 2017 at 01:53 AM ·
scripting problem2d gamescripting beginnerhithitbox
Hello can anyone help me in my code i am converting some code JS to C#
I got this problem alt text
it says in the console
Assets/Scripts/PlayerManager.cs(123,12): error CS1624: The body of PlayerManager.Hit()' cannot be an iterator block because
void' is not an iterator interface type
ahhhh.png
(149.8 kB)
Comment
Best Answer
Answer by Buckslice · Dec 05, 2017 at 02:00 AM
You need to change the return type of the function to IEnumerator if you are using a coroutine. Check out the Unity doc on coroutines.