I want to ask on how to be able to test if my multiplayer game is working before building it. is this possible? if yes, how?
I have a multiplayer project and I test by using two instances on the same computer using the localhost ip address. One I build and run, the other I run in the editor.
I can currently only debug the one running in the editor however. So maybe I will soon start testing with two separate machines/PCs.
A mulitiplayer game can be tested by building the project and play with the build and with unity’s editor(If u have one program for server and client).If u have two programs just play the server in the editor and play the client in the editor each in its project(and build the client and play with it too if u want two clients).
NOTE:when testing networking in the editor make sure “Run in background” is checked on (by opening Edit-> Project Settings-> Player then check “Run in background” from the inspector)
Hi @JustAGuy, I was have exactly the case you mention with the server in one project and the client in another project.
For some reason, when I set the host in one project and the client in the other project, I get the error message “Failed to spawn server object, did you forget to add it to the NetworkManager? assetId=10a722dbb60160542b789e20d437496e netId=2 UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()”, while if I run just a single project in the editor and build the same project, then everything works. I tried also running the editor/build in one project and the build in the other, and I get the same error. I also set “run in background” as you suggest but no effect.
An interesting thing is if in each of these projects I use the NetworkClient and NetworkServer without a NetworkManager, then I can do message passing between the two projects without any errors.
Any idea why I could be having this problem?