#clone of the player joining my multiplayer session instead of the actual player trying to connect

1 messages · Page 1 of 1 (latest)

sharp canyon
#

they players do connect to the same session apparently but they don't show up on each players screen where they're "supposed" to be
ie: instead of each player seeing the other person on their own screen they instead just see a clone of themselves for some reason that copies their inputs
the UI is also broken for some reason and doesn't apply on the second player trying to connect
UI manager --> https://blazebin.io/fqhsftlmvapl/0
script handler on the player body --> https://blazebin.io/kvjbpklafyee/0

#

if anyone maybe knows what's going on here and how to fix it that'd be great

dense ore
#

You need to split the UI from all the character control stuff. That entire UI Manager is running locally for each player,

sharp canyon
dense ore
#

Oh, I see. I skimmed through it too quickly. The UIManager shouldn't have anything to do with your player movement.

#

I would use the player's OnNetworkSpawn() to disable/enable components if its localPlayerObject is true.

#

Also make sure any NetworkBehaviour components remain enabled on all clients

sharp canyon
#

or like wdym

dense ore
#

Have a network behavior component on the player object. When it spawns it can check if it's the local player object. It can disable/enable its own components. The UI manager should only be managing local non networked UI things.

sharp canyon
dense ore
#

You have something else going on if the clients are not in the same scene. The Network Manager will sync the scenes when clients connect. If you have a player prefab assigned in the network manager then it will spawn clones of that prefab for each client that connects

sharp canyon
dense ore
# sharp canyon like here ^^

The UI problems are likely due to the client not having access to the connected client list. That is usually a host/server only thing. Also don't know how your players are set up. if they all have a camera and player input or not

sharp canyon
sharp canyon
dense ore
sharp canyon
#

the players also just don't show up on eachothers screen either

dense ore
#

it looks like the player object is falling through the floor. Are you using a Network Transform on the player?

#

If it has a rigidbody you would probably want a network rigidbody as well

sharp canyon
#

oh

#

yeah okay

#

the players are actually synced on screen now though which is rly nice :D

dense ore
sharp canyon