Token From Boltnetwork.Connect Is Null Most Of The Time
Options
Blonde
✭
in Photon Bolt
Trying to send a username to the server when connecting but the token i send using Boltnetwork.Connect() is null about 90% of the time.
Heres the code:
The UserConnectToken class is the same as the Token UserToken in the examples.
Heres the code:
public override void BoltStartDone() { BoltNetwork.RegisterTokenClass<UserConnectToken>(); } public void JoinGame() { UserConnectToken connectToken = new UserConnectToken(); connectToken.username = m_joinUserName.text; BoltNetwork.Connect(m_serverElementsList[SelectorFindClosest()].m_session, connectToken); } public override void ConnectRequest(UdpEndPoint endpoint, IProtocolToken token) { if (token == null) { Debug.Log("Token is Null"); } else { BoltNetwork.Accept(endpoint, token); } }
The UserConnectToken class is the same as the Token UserToken in the examples.
0
Comments
-
Are you using the Photon Cloud integration?0
-
yes0
-
replace your PhotonPoller.cs with the one from the latest version on asset store0
-
Updating PhotonPoller.cs didnt help, but I did Notice that its a problem with my other token that i use in BoltNetwork.SetHostInfo(). Because of this i get two of the same errors:
0