How do I network two separate applications?

I’m new to networking, but I’ve figured out the basics of initializing server and clients and NetworkViews on game objects. This is all using the same code base - starting two instances of the same application.

What I want to do is have 2 separate applications able to network. One will be a server application and the other a kind of remote control - two separate code bases. I’ve tried this and the applications connect to each other (OnConnectedToServer and similar functions are triggered), but Network.Instantiate doesn’t work. I typically get an error about a NetworkView being missing, even though the Prefab is identical in both applications.

I’m wondering if there is something in the configuration of the applications that would allow them to network? Maybe a kind of ID or similar that identifies them as the “same” app? Or am I thinking about this the wrong way?

I never tried to connect two different applications with Unity’s Raknet-based network engine but i don’t think that there’s something like an ID for an application. I guess the problem is that if you create two independent Unity projects the assetdatabase is different in those applications.

NetworkInstantiate (which i try to avoid by any means) needs to send the information what it should instantiate on the other side. Since the two applications are not based on the same database the asset GUIDs won’t match.

I would suggest that you build both applications from the same project. Just create two scenes, one for the server and one for the client. If you build the server just include the server-scene, if you build the client only the client scene. That way both are using the same database but are two different applications.

Only some suggestions …