Search Unity

Strange issue with Coroutines not working after leaving an online game.

Discussion in 'Multiplayer' started by HappyBadgerStudio, Feb 21, 2017.

  1. HappyBadgerStudio

    HappyBadgerStudio

    Joined:
    May 6, 2014
    Posts:
    19
    Hello everyone, Joey here.

    I've been hammering away at getting online multiplayer in our game, and I've come across a few road blocks.

    I've been trying to figure out why my Network Matches only last ~30 seconds even though I stay connected to them, but that isn't as weird of an issue as this; For whatever reason, after creating a match, and entering a game and then leaving it (completely, exiting offline scene, shutting down the network server, all that jazz), causes every use of StartCoroutine() to just not work at all. This is in literally every scene after leaving an online game. If it uses coroutines, the game just stops right at the line. I can use the debugger and follow it to exactly that point, and when it gets there, it will just jump out and stop. The game doesn't freeze or hang, it just literally stops executing code when it hits a coroutine. I have a couple of menus that I can access via keyboard keys, that will allow me to even change scenes, and as long as that scene doesn't use coroutines it is fine.

    Has this happened to anyone else? It seems pretty strange.

    I can elaborate a bit more if need be, but that is pretty much the jist of it.

    Thank you for your time, I appreciate it!
     
  2. HappyBadgerStudio

    HappyBadgerStudio

    Joined:
    May 6, 2014
    Posts:
    19
    Bump, has anyone experienced this at all? I've been out at GDC and just got back into the office, going to submit a bug report for it now.