I just downloaded the network example code and running the TPS-AUTH project.
I compiled a stand-alone application that I am using as the master server.
I run the TPS-AUTH project from within Unity connecting to the server using the default settings (127.0.0.1 - I am running both master server and unity from the same machine.)
I get the following error messages during the connection:
RPC call failed because the function ‘LoadLevel’ does not exist in the any script attached to ‘SpawnPoint’.
View ID SceneID: 1 Level Prefix: 2 not found during lookup. Strange Behaviour may occur.
Couldn’t invoke RPC function ‘InitPlayer’ because the networkView ‘SceneID: 1 Level Prefix 2’ doesn’t exist.
Forgive me if this appears to be a newbie question. I just recently started working with Unity.
You can try this: open up the TPS-Auth scene in the editor, deploy it as standalone, run it and start a server there. Then connect to it from the editor, it should work.
The standalone I built included all of the examples, so it included the loader, thus running ConnectGuiMasterServer.js, which allowed me to create a server and select the the TPS-Auth example to run. That is what I meant by Master Server.
This worked. I unchecked all of the other scenes when building the TPS-Auth project so the standalone only ran the TPS-Auth example and not the loader. It works just like you said. Thanks.
I am still not exactly sure why it doesn’t work with the loader scene running using ConnectGuiMasterServer, instead of just ConnectGui that TPS-Auth uses.
I guess the confusing part about it is a connection is made, but fails elsewhere.
What exactly is the difference behind ConnectGui and ConnectGuiMasterServer that make these connections incompatible?
Thanks for the help. This gets me back up and running again.
Well, its just that the loader scene is incompatible with the TPS-Auth scene, the objects don’t match + the view IDs. If you used the loader scene but loaded (using one of the buttons) the TPS-Auth scene in there before connecting directly with only the TPS-Auth scene client, it should work.
ConnectGui is for direct connections between server and client, where the IP and port must be manually set. This is used in all the scenes individually, when a single scene is used alone but not the loader scene. The ConnectGuiMasterServer uses the master server for setting up connections in addition to doing some connection testing and informing the user on what his connectivity options are. This script uses the same connect routine as the direct connect script, it just uses information (IP and port) from the master server instead of manual input. You can attach either script to a scene to add connection routines, master server or direct connect.
This is perhaps unrelated to the OP’s post, but it’s an old post and I couldn’t find any more information on this problem on a web search, so this is for anybody who comes after.
We had this problem pop up today because the client/server had different versions of the scene - in fact, functionally equivalent versions of a scene where we made the same change on two computers. So if you get this issue make sure that you are working with exactly the same scene file on both ends. Worked for me anyway.