//Load public void Load() { // Debug.Log("LOAD"); // XmlSerializer serializer = new XmlSerializer(typeof(Userdatabase)); // FileStream stream = new FileStream(Application.dataPath + "/item_data.xml", FileMode.OpenOrCreate); //임시로 항상 생성 // FileStream stream = new FileStream(Application.dataPath + "/item_data.xml", FileMode.Create); // Debug.Log("length"+stream.Length); // if (stream.Length > 0) // { // Debug.Log("stream.Length = " + stream.Length); // userDB = serializer.Deserialize(stream) as Userdatabase; // GameObject.Find("Login").SetActive(false); // } // else // { userDB = new Userdatabase(); //기본으로 3개세팅 item1.chatroomname = "&Gps"; item2.chatroomname = "&Gps"; item3.chatroomname = "&Gps"; totalroom[clienttotalroomcnt].chatroomname = "전체방"; totalroom[clienttotalroomcnt].clientidx = 3; totalroom[clienttotalroomcnt++].serveridx = 3; Debug.Log(clienttotalroomcnt + "clienttotalroomcnt in makeroom2"); userDB.chatlist.Add(item1); userDB.chatlist.Add(item2); userDB.chatlist.Add(item3); userDB.chatlist.Add(totalroom[0]); GameObject newchatroom = Instantiate(ChatCanvas) as GameObject; newchatroom.transform.SetParent(Chat.transform, false); newchatroom.SetActive(false); newchatroom = Instantiate(ChatCanvas) as GameObject; newchatroom.transform.SetParent(Chat.transform, false); newchatroom.SetActive(false); newchatroom = Instantiate(ChatCanvas) as GameObject; newchatroom.transform.SetParent(Chat.transform, false); newchatroom.SetActive(false); newchatroom = Instantiate(ChatCanvas) as GameObject; newchatroom.transform.SetParent(Chat.transform, false); newchatroom.SetActive(false); GameObject.Find("ScroolRects").SetActive(false); // } // stream.Close(); }
public static IMongoCollection <registration> clients_collection() { return(Userdatabase.GetCollection <registration>("Clients")); }