void SaveSetting( ) { var setting = new gamedef.LoginSetting(); setting.Account = Account; setting.Address = Address; LocalSetting.Save <gamedef.LoginSetting>("login", setting); }
public void Start( ) { var a = new gamedef.LoginSetting(); a.Account = "hello"; var writer = new System.IO.MemoryStream(); ProtoBuf.Serializer.Serialize(writer, a); writer.Position = 0; var c = ProtoBuf.Serializer.Deserialize <gamedef.LoginSetting>(writer); }
public LoginModel(GameObject loginui) { _loginPeer = loginui.GetComponent <NetworkPeer>(); _setting = LocalSetting.Load <gamedef.LoginSetting>("login"); }