Skip to content

Commit

Permalink
Fix cwd for Windows by using cross-platform Application.dataPath
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Sep 19, 2014
1 parent 93bf68d commit c06378a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HappyFunTimes/GameServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class GameServer {

public class Options {
public Options() {
cwd = System.IO.Directory.GetCurrentDirectory();
cwd = Application.dataPath;
disconnectPlayersIfGameDisconnects = true;
}
public string gameId;
Expand Down Expand Up @@ -158,7 +158,7 @@ private void SocketMessage(object sender, MessageEventArgs e) {
if ( e!= null && e.Type == Opcode.Text) {
try {
// Handle ping.
if (e.Data == "P") {
if (e.Data == "P") {
Send("P");
return;
}
Expand Down
1 change: 1 addition & 0 deletions HappyFunTimes/GameSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public GameSystem(GameServer server) {
}

private void OnExit(MessageExit data) {
Debug.Log("quit!");
Application.Quit();
}

Expand Down

0 comments on commit c06378a

Please sign in to comment.