public DemoServer() { ServerPacketHandler.HoldCode.Init(); demoServer = this; serverData = new ServerData(); serverData.LoadData(); Debug.Log("Init DemoServer"); sth = new ServerThread(); var t = new Thread(new ThreadStart(sth.run)); t.Start(); }
void Awake() { loginInit = this; if (SaveGame.saveGame == null) { var saveGame = new GameObject("SaveGame"); saveGame.AddComponent <SaveGame>(); saveGame.GetComponent <SaveGame>().InitData(); saveGame.GetComponent <SaveGame>().InitServerList(); } var sd = new ServerData(); sd.LoadData(); }