Search Unity

Question Netcode working in unity but not in a built game.

Discussion in 'Netcode for GameObjects' started by KristenBoyGames, Apr 21, 2022.

  1. KristenBoyGames

    KristenBoyGames

    Joined:
    May 23, 2021
    Posts:
    38
    Some days ago i posted about my Netcode and relay not working when i build the game and by the 113 views and 0 replys i assume that the issue is not in my relayManager script.

    How should i debug such issue? Should i just make a new project and copy the code step by step to there and find when it stops working? Could the problem be in project settings? Could the problem be with the Unity Transport variables (port, packet size, ip)?

    plz help, i am kinda in a hurry and i haven't dealt with multiplayer games before!
     
  2. CosmoM

    CosmoM

    Joined:
    Oct 31, 2015
    Posts:
    204
    I have no idea as I've never used Relay. However, Boss Room was just updated to use it – perhaps that can help as an example...?

    Otherwise, starting a new minimal project to test your code is always a good idea.
     
  3. KristenBoyGames

    KristenBoyGames

    Joined:
    May 23, 2021
    Posts:
    38
    OK, so i did some testing in a smaller project and the code for relay works, but i noticed that in the original project the networkManager spawns the player prefab in the wrong scene, why does it do that and how to change it?