WebHooks Timeout

Options

Is there any kind of timeout system in WebHooks that isn't in UDP? When loading a large scene, it seems to just abruptly disconnect while trying to register the PhotonViews. Can I change a line in the Photon plugin that would disable this apparent limit/timeout for PhotonView registration?

Thanks!

@Tobias

Best Answer

  • Tobias
    Tobias admin
    Answer ✓
    Options

    WebGL is likely the issue here. While other platforms are multi threaded (and can run the network logic independent from the main thread while Unity loads), WebGL isn't. It will simply not run anything but the main thread and if that's blocked with loading ... you run into timeouts.

    We can't provide a workaround for this with the Photon Public Cloud, as the timeout for the connection is also set server side (10 sec without any message and the client gets disconnected).

    Maybe you could load async and or split the big scene into multiple smaller ones, loaded additively.

Answers

  • Tobias
    Tobias admin
    edited January 2023
    Options

    You load scenes from some sort of content server via WebHooks?

    You mean Plugin in the sense of Photon Server plugin?

  • DarkJoltGames
    Options

    @Tobias

    I mean the photon networking plugin in general. I'm just trying to join a room and load a scene with lots of PhotonViews. It works fine on UDP, but webhooks seems to stall out every time.

  • Tobias
    Options

    You may want to check out our terminology a bit more. There is no "photon networking plugin in general". I assume you mean PUN but at this point can only guess.

    UDP is a transport protocol. WebHooks isn't. So I assume you mean WebSockets (and WebGL exports).

    and load a scene with lots of PhotonViews

    We don't really limit how many you can have of those but it is your responsibility to figure out how many your game can use to properly work on the platforms you target.

    Let me know if you use PUN, which version and what platforms you target and I may be able to chime in.

  • DarkJoltGames
    Options

    @Tobias

    Thanks for your response,

    As for the protocol, I meant to say WebSockets. I use PUN Classic and I'm trying to build to WebGL, which is why I need it. UDP and TCP work fine in mere seconds, but both Websockets and Websockets Secure refuse to load fully and call a disconnect while registering PhotonViews.

  • Tobias
    Tobias admin
    Answer ✓
    Options

    WebGL is likely the issue here. While other platforms are multi threaded (and can run the network logic independent from the main thread while Unity loads), WebGL isn't. It will simply not run anything but the main thread and if that's blocked with loading ... you run into timeouts.

    We can't provide a workaround for this with the Photon Public Cloud, as the timeout for the connection is also set server side (10 sec without any message and the client gets disconnected).

    Maybe you could load async and or split the big scene into multiple smaller ones, loaded additively.

  • DarkJoltGames
    Options

    @Tobias

    That was exactly what I needed to know, thanks for your patience.

    I'll try some other methods for loading it!