Connect time out while my codes are as same as fusion 102

Options
growingmaster
edited January 2023 in Fusion

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:

  1. 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.
  2. 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.
  3. 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.

Answers