Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto spawned Player objects spawning on clients when Spawn With Observers is false (NGO 2.0.0 only). #3076

Open
ezoray opened this issue Sep 25, 2024 · 1 comment
Assignees
Labels
priority:high stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report

Comments

@ezoray
Copy link

ezoray commented Sep 25, 2024

Description

With the Spawn With Observers flag unticked on the Player prefab Player objects of other clients will spawn on a client, but (correctly) not its own.

NGO 1.11.0 behaves correctly and no Player objects are spawned on clients.

Reproduce Steps

  1. Create Player prefab with Spawn With Observers unticked on the NetworkObject component.
  2. Add prefab to as the Default Player Prefab on the NetworkManager.
  3. Run project as host and have a client connect to it.

Actual Outcome

On client connection the host's Player object spawns on the client, the client's own Player object correctly does not.

Expected Outcome

No Player objects should spawn on the client.

Environment

  • OS: macOS Big Sur
  • Unity Version: Unity 6
  • Netcode Version: NGO 2.0.0

Additional Context

The code used to test is here, it's currently set to NetworkShow the client's own Player so both host and client's Player objects will be spawning.

@ezoray ezoray added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Sep 25, 2024
@NoelStephensUnity
Copy link
Collaborator

Looks like NetworkSpawnManager.AddPlayerObject is the culprit here.
I will have a PR up for this fix sometime today/tomorrow and the fix should be in the next NGO v2.0.1 update.

@NoelStephensUnity NoelStephensUnity added priority:high stat:import Status - Issue is going to be saved internally and removed stat:awaiting triage Status - Awaiting triage from the Netcode team. labels Sep 26, 2024
@NoelStephensUnity NoelStephensUnity self-assigned this Sep 26, 2024
@fluong6 fluong6 added stat:imported Status - Issue is tracked internally at Unity and removed stat:import Status - Issue is going to be saved internally labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants