Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

what should I do to let clients join to the host scene in online games

Discussion in 'Multiplayer' started by ziyad1160, Jun 28, 2022.

  1. ziyad1160

    ziyad1160

    Joined:
    Dec 5, 2020
    Posts:
    4
    hi, I'm working on online game, and I'm facing an issue related to network management, what should I do to let clients join to the host scene, as you know normally they are spawning in different scenes but what happening is syncing their animation and transform, and what should I use (photon or mirror, etc..) as a network manager?
     
  2. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    334
    Fish-Networking has this feature built-in. As far as I know FishNet is the only solution with a network scene manager that handles single, additive, stacked, addressable scenes completely included without having to write custom code.
    There's also a ton of other features that really makes FishNet stand out over other options as well.
    https://fish-networking.gitbook.io/docs/ is the documentation. There's also a link to our very active community in there.
     
  3. ziyad1160

    ziyad1160

    Joined:
    Dec 5, 2020
    Posts:
    4
    thanks for answering but i tried to use fish network but, unfortunately , that did not solved the problem



    let me explain , for example :
    this is one of the clients ,everything seems to be fine but the first problem is the second player is doing the exact movements that i do
    upload_2022-6-29_22-9-12.png

    and this is the second player:
    upload_2022-6-29_22-12-36.png
    first there are only 2 players as shown in the hierarchy , but (same problem at the first player) the he is doing what the second player do + the first player spawned in different world ( cuz i imported a dungeon generator that generate random maze every time you enter to the game ) and that is my main problem , i want to let the clients join to the same scene to solve this problem (not to join to a different worlds and sync their movements)
     
  4. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    334
    You probably are missing the IsOwner check. https://fish-networking.gitbook.io/docs/manual/guides/ownership
    Check that link out, there is specifically a part about moving your own object. Let me know if that helps.
     
  5. ziyad1160

    ziyad1160

    Joined:
    Dec 5, 2020
    Posts:
    4
    ok that solved the character controller , but what should i do to solve the random maze generator problem?