Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Please help!!!

Discussion in 'Connected Games' started by Michael611, May 17, 2018.

  1. Michael611

    Michael611

    Joined:
    May 9, 2018
    Posts:
    13
    I have a problem: When I start my game (with host and client), I can see host player moving in client game but I can't see client player moving in the host game. Does anybody know the solution?
     
  2. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    211
    All depends on what your using. You likely have not told the API to view the network objects.

    For instance: Photon requires a network view to be attached. // Unet requires the same or if your using newer version: NetworkIdentity.

    Basically if you do not sync the objects/scripts/animations over the network and tell the network that these are network objects and to "watch them - View", you will only see it on the host client, not across the server.
     
    Michael611 likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,592
    You're not saying anything useful to help you get an answer.

    What networking API are you using?
    Where is your code? Post it using Code tags.
    What have you tried already?
    How are you handling movement of client players?
    Are you moving them locally and syncing to the server?
    Are you sending movement commands to the server and then syncing the moved player back to the client?
     
    Last edited: May 17, 2018
    Michael611 likes this.
  4. thesupersoup

    thesupersoup

    Joined:
    Nov 27, 2017
    Posts:
    37
    I highly recommend viewing the following YouTube tutorial on synchronizing players over the network:


    And the follow up:


    That should get multiple players synchronized between host and client.
     
    Michael611 likes this.
  5. Michael611

    Michael611

    Joined:
    May 9, 2018
    Posts:
    13
    Thanks but I have already found the solution: Check the LOCAL PLAYER AUTORITY box in network identity script.
    Thanks for the help!