void Start( ) { var setting = LocalSetting.Load <gamedef.LoginSetting>("login"); var loginPeer = GetComponent <NetworkPeer>(); loginPeer.Address = setting.Address; }
void LoadSetting( ) { var setting = LocalSetting.Load <gamedef.LoginSetting>("login"); if (setting != null) { Account = setting.Account; Address = setting.Address; } if (string.IsNullOrEmpty(Account)) { Account = "t"; } if (string.IsNullOrEmpty(Address)) { Address = "127.0.0.1:8101"; } }
public LoginModel(GameObject loginui) { _loginPeer = loginui.GetComponent <NetworkPeer>(); _setting = LocalSetting.Load <gamedef.LoginSetting>("login"); }