Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Bug Importing the Multiplayer Samples Utilities from GitHub breaks the project

Discussion in 'Netcode for GameObjects' started by loransalabood, May 6, 2023.

  1. loransalabood

    loransalabood

    Joined:
    Feb 14, 2017
    Posts:
    2
    Hello guys,

    I am reporting an error regarding importing Multiplier Samples Utilities using the GitHub link from the documentation (provided velo). Here are the steps to replicate the error messages:

    1- Unity 2021.3.24f
    2- Brand new 3D Core project
    3- Import NetCode from the Package Manager
    4- Import Multiplayer Samples Utilities from: https://github.com/Unity-Technologi...kages/com.unity.multiplayer.samples.coop#main
    5- Immediately 6 error messages like the following: lbrary\PackageCache\com.unity.multiplayer.samples.coop@a4cafe2062\Utilities\SceneManagement\SceneLoaderWrapper.cs(46,28): error CS1061: 'NetworkManager' does not contain a definition for 'OnServerStopped' and no accessible extension method 'OnServerStopped' accepting a first argument of type 'NetworkManager' could be found (are you missing a using directive or an assembly reference?)


    I managed to get around the problem by simply copying the ClientNetworkTransform code from the documentation. But I think many people would get stuck here. I am following a community example provided on the documentation page and I think many people who are following the example would face the same problem
     
  2. cerestorm

    cerestorm

    Joined:
    Apr 16, 2020
    Posts:
    658
    Check the version of Netcode you're running as it sounds like you need 1.4.0.
     
    Mj-Kkaya likes this.
  3. skhan2523

    skhan2523

    Joined:
    May 26, 2016
    Posts:
    16
    I faced the same problem. So I commented out the lines.
     
  4. Harsha_U

    Harsha_U

    Joined:
    Oct 31, 2020
    Posts:
    3
    This worked, I changed the version in the manifest.json file, but unity recommends 1.1.0 version as the 1.4.0 is not yet verified. I had to change through the manifest file as the version were not showing up in the versions dropdown in the package manager window.
     
    cerestorm likes this.
  5. movyx01

    movyx01

    Joined:
    Jan 13, 2022
    Posts:
    1
    Hey, i ran into the exact same problem/errors. In my case, using the newest Unity-Version 2022.3.0 fixed the problem.
     
  6. skhan2523

    skhan2523

    Joined:
    May 26, 2016
    Posts:
    16
    Yeah it is a version issue. I am using 2021.3.25