Skip to content

[DA] OnGainedOwnership and OnLostOwnership callbacks are invoked on all clients #3345

Closed
@kevincastejon

Description

@kevincastejon

Description

The OnGainedOwnership and OnLostOwnership methods descriptions says that, with the Distributed Authority mode, they are called only on the local client that gained or lost ownership on the object.

But actually these methods are called on each client regardless of them being concerned or not by the ownership gain/lost.

Reproduce Steps

  1. Use DistributedAuthority topology
  2. Change ownership on one client side
  3. See all clients having their callbacks invoked

Actual Outcome

OnGainedOwnership and OnLostOwnership callbacks are invoked on all clients

Expected Outcome

OnGainedOwnership and OnLostOwnership callbacks are invoked only on client that actually gain or lost the ownership.

Screenshots

Image

Environment

  • OS: Windows11
  • Unity Version: 6000.0.41f
  • Netcode Version: 2.2.0

Additional Context

On the attached gif screen record, the ownership of the sphere transferable network object is changed on mouse down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumThis issue has medium priority and may take some time to be resolvedstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Reporttype:docsDocs feedback or issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions