Skip to content

LoadEventCompleted scene event not invoked when a client disconnects before finishing loading a scene #1902

Closed
@LPLafontaineB

Description

@LPLafontaineB

Description

If a scene load is initiated by the server, and a client disconnects before finishing loading the scene, the server will have to wait until NetworkConfig.LoadSceneTimeOut before invoking the event. The same happens for unload events.

Reproduce Steps

  1. Start a game with at least one connected client
  2. Have the server listening for LoadEventCompleted SceneEvents
  3. Pause one client
  4. Initiate the scene load
  5. Wait until the paused client times out and gets disconnected by the server

For this to happen, DisconnectTimeoutMS must be lower than LoadSceneTimeOut. By default they are 30s and 120s respectively.

Actual Outcome

The LoadEventCompleted is not triggered and keeps waiting until NetworkConfig.LoadSceneTimeOut has elapsed.

Expected Outcome

The LoadEventCompleted is triggered when the client is disconnected, and it is added to the list of clients that timed out.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • OS: Win10
  • Unity Version: 2020.3.33f1
  • Netcode Version: 1.0.0-pre.7

Additional Context

Tested on the BossRoom sample.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions