Forum Discussion

grindinggear's avatar
grindinggear
Honored Guest
31 days ago

How to set up colocation with server ?

I know colocation default use local matchmaking with startasHost , Guest to multiplayer . How can i set up colocation with netcode startServer and startClient ?

1 Reply

  • ycliu613's avatar
    ycliu613
    Meta Employee

    Hey grindinggear, thanks for the question about Multiplayer building blocks. Could you share more about what you want to achieve with netcode startServer and startClient?

    If you choose the Unity Netcode flavour of the Colocation block, it already starts a server under the hood for the first player, and start as clients for subsequent players. If you don't want to automatically start, you can toggle off the option in the Colocation block components and call the public start as host/guest functions yourself by hooking up to your UIs etc.