Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.15k
stars
435
forks
source link
Auto spawned Player objects spawning on clients when Spawn With Observers is false (NGO 2.0.0 only). #3076
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.
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
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
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.