I try to call my IEnumerator function, but for some reason it does not respond.
Here’s the code and the console messages:
public class Swing_Movement : SlideSwing_Basic
{
//Variables
void Start()
{
StartCoroutine(MovementController()); //Note: there are 7 objects with this script
}
void manipulate()
{
if (Input.GetButtonDown("Manipulate Object") && !BlockInput)
{
Invoke("MovementController", 0.0f);
print("MovementController call");
}
}
IEnumerator MovementController()
{
print("MovementController respond");
//Do stuff
}
}
There are 7 objects with this script, so after the “MovementController call” there should be 8 “MovementController respond” messages!