Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

StartServer listen failed on NetworkLobbyManager

Discussion in 'Multiplayer' started by TheDreamEXE, Sep 19, 2015.

  1. TheDreamEXE

    TheDreamEXE

    Joined:
    May 14, 2015
    Posts:
    60
    So I was working on a custom NetworkLobbyManager script when I got the error "StartServer listen failed.". The following code snippet is what I'm using on a GUI button:


    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using UnityEngine.UI;
    4. using UnityEngine.Networking;
    5.  
    6. public class MainLobby : NetworkLobbyManager {
    7.  
    8.  
    9.     public void HostGame()
    10.     {
    11.         SetPort();
    12.         NetworkLobbyManager.singleton.StartHost();
    13.     }
    I made it the first function so you could see all of the import settings etc. I have no clue what's wrong though. My custom NetworkManager follows a similar design structure and works without any hiccups. Any thoughts?

    EDIT: I got it working. The server wouldn't spawn a player object, so I just did an override function. For some reason I cannot get the scenes to change though. Servers can change manually with a NetworkLobbyManager.ServerSceneChange(), but clients will not change with it
     
    Last edited: Sep 19, 2015
  2. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    Have you managed to get it working ?
     
  3. TheDreamEXE

    TheDreamEXE

    Joined:
    May 14, 2015
    Posts:
    60
    I have not. I won't be able to work on it for another five or six hours, as I have afternoon and night courses in college today.
     
  4. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    Note that the server will only change map when all the players are ready.