Skip to content

ChangeOwnership of an object is triggering a message to all clients. #2242

@ezoray

Description

@ezoray

Description

When the server changes ownership of an object the server attempts to send a message to that object on all clients when it should only send a message to the client gaining or losing ownership and only if that client is currently observing the object.

Reproduce Steps

  1. Start server
  2. Connect two clients, A & B
  3. Spawn a network object with server ownership and make visible to client A only
  4. Change ownership to client A

Actual Outcome

A warning is displayed on client B - [Netcode] Deferred messages were received for a trigger of type OnSpawn with key 6, but that trigger was not received within within 1 second(s).

Expected Outcome

Client B shouldn't be sent the change of ownership message.

Environment

  • OS: macOS Big Sur
  • Unity Version: 2020 LTS
  • Netcode Version: develop

Additional Context

Incidentally if an object is spawned and neither client A nor B are observing, if ownership is switched to one of them they will both display the warning message.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions