Connect time out while my codes are as same as fusion 102
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Fusion.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Connect time out while my codes are as same as fusion 102
growingmaster
2023-01-13 03:20:26
I am completely new to photon. So I try to learn it through Fusion 100. But my codes are confronted with Connection time out when a client try to start game. The following is what I met and what I have done:
To find out the reason, I made a small experiment. For my host could connect normally, I tried to connect another host to the same session, and it told me that there had already existed a host to the session just as expected. I don't know whether it can be regarded as evidence that the connection is working.
I suspect that it has something to do with the region, for I am in China mainland. So, I sent an email to photon China, and successfully activated my appId. I couldn't find the "connectToChina" function in the codes. All the references about codes are with regard to PUN. So I just modified the App settings as said in the document. Sadly, it made no sense. My connection timeout was still there without any change.
Another experiment was conduct after that. I logged the events that clients join and leave, and, to my surprise, it logged twice when one of my client tried to connect. As usual, the client met a StartGameException owing to connection timeout, but the host NetworkRunner told me there were 3 active players in the scene.
I checked my code carefully for 4 days while no mistake was found. The references I have covered documents of Fusion 100, Region, Timeout, Disconnect, Session and so on. I am so desperate. If any codes are needed, here they are:
my BasicSpawner:
The caller, which called by two button:
There's nothing but some SetActives in the Init function.
Comments
growingmaster
2023-01-13 03:24:04
Sorry, I found it is PUN block just now...I would post my question in the fusion block.
Moved it.
Back to top