diff --git a/HappyFunTimes/HappyFunTimes.csproj b/HappyFunTimes/HappyFunTimes.csproj index 3abb84c..e470725 100644 --- a/HappyFunTimes/HappyFunTimes.csproj +++ b/HappyFunTimes/HappyFunTimes.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="UnityEngine"> - <HintPath>..\..\..\..\..\..\Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll</HintPath> + <HintPath>..\..\..\..\..\Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll</HintPath> </Reference> <Reference Include="DeJson"> <HintPath>libs\DeJson.dll</HintPath> diff --git a/HappyFunTimes/PlayerSpawner.cs b/HappyFunTimes/PlayerSpawner.cs index 9f4b7cd..081b539 100644 --- a/HappyFunTimes/PlayerSpawner.cs +++ b/HappyFunTimes/PlayerSpawner.cs @@ -23,11 +23,12 @@ void StartConnection() { options.gameId = gameId; m_server = new GameServer(options, gameObject); - m_server.Init(); m_server.OnPlayerConnect += StartNewPlayer; m_server.OnConnect += Connected; m_server.OnDisconnect += Disconnected; + + m_server.Init(); } void StartNewPlayer(object sender, PlayerConnectMessageArgs e) @@ -50,6 +51,8 @@ void Connected(object sender, EventArgs e) void Disconnected(object sender, EventArgs e) { + Debug.Log("Quitting"); + Application.Quit(); } void Cleanup()