Skip to content

Spawning new player object does not remove previous #528

Closed
@LukeStampfli

Description

@LukeStampfli

Describe the bug
Spawning a new player object with SpawnAsPlayerObject does not set the IsPlayerObject property of the previous player object to false allowing for multiple player objects which shouldn't be the case.

To Reproduce
Steps to reproduce the behavior:

  1. Spawn an object as player object
  2. Spawn another new object as player object
  3. The referenced player object in NetworkClient gets updated correctly to the new one.
  4. The old player objects IsPlayerObject property is still true on both the client and the server.

Expected behavior
There should always only be one player object. IsPlayerObject should be updated to false on existing objects when a new player object gets spawned.

Environment (please complete the following information):

  • OS: [e.g. Windows 10]
  • Unity Version: [e.g. 2019.1]
  • MLAPI Version: [e.g. v6.0.1]
  • MLAPI Commit: feea3c1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions