Search Unity

Player objects not visible to other clients (Golden Path tutorial)

Discussion in 'Netcode for GameObjects' started by Mythscape, May 26, 2021.

  1. Mythscape

    Mythscape

    Joined:
    Feb 28, 2021
    Posts:
    4
    I've followed the Golden Path tutorial here - https://docs-multiplayer.unity3d.com/docs/tutorials/goldenpath

    I start the server and then start 2 client applications, there are two player objects (capsules) moving in circles on the server screen, however each client only sees their own capsule.

    Is there something I need to do so that clients can see all other clients capsules?
     
  2. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    Did you add a `NetworkTransform` component to your player objects? I think the text tutorial just tells you to add `NetworkTransformTest` but you also need `NetworkTransform`.
     
  3. Mythscape

    Mythscape

    Joined:
    Feb 28, 2021
    Posts:
    4
    Yes, the tutorial I followed includes adding the network transform component and I have one added to the player prefab with the default settings.
     
  4. MadMojo

    MadMojo

    Joined:
    Oct 16, 2014
    Posts:
    19
    If you followed along from the previous tutorial, make certain you are starting fresh on that tutorial. And make certain if you are following along and there are different movement added in some of the previous sections, that you remove it to avoid a conflicting result from the following sections. I believe I ran into a similar issue when I first was going through those tutorials and it was just because I hadn't removed some movement code from a previous section that was interfering with the expected result.
     
  5. Mythscape

    Mythscape

    Joined:
    Feb 28, 2021
    Posts:
    4
    I must have made a mistake earlier on in the tutorial.

    I started it again from scratch and it's now working as expected.
     
    MadMojo likes this.