I'm trying to convert the HSController.js script from the wiki to C# and I'm having a bit of a problem. I have simplified the problem to this:
public void Start () {
test("Jack");
}
public IEnumerator test(string MyName) {
yield return new WaitForSeconds(1);
Debug.LogWarning("My name is " + MyName);
}
What happens is that I don't get a log warning. When I remove the "MyName" property from the function, and just call "test();" it works.
Can anyone explain to me why? And how to solve this issue?
As I said, I'm trying to convert HSController.js to C#, which uses yield to wait for a high-score to be submitted to a PHP script. The function needs parameters as well (name, score, etc...). The JS script works fine, but in JS I don't have to work with IEnumerator.
Thanks in advance.