Networking between two different projects

Hello,

the problem is this: we want to split client and server of our game in different projects, but we’re not able to make RPC work.
On the server I have a prefab of an object with attached a script (the networkView is attached), whose methods I want to invoke from the clients.
When the client connects I call Network.Instantiate on the server to instantiate the object and here I get the first error: “MissingReferenceException: The variable controllerPrefab of ‘NetworkManager’ doesn’t exist anymore”.
Moreover on the client I get another error when I try to call a method on the object, because it doesn’t exist.

I tried something similar. First of all you can’t completely seperate the server from the client. Both instances need the exact same prefab(s) (asset instance ID) or Network.Instantiate wouldn’t work.

Next thing is, which is quite annoying, both sides need all RPC functions you want to use. Even when you have functions that are only called on the server, the client needs to implement them as well or the call fails. The functions only have to exist, they don’t need to do the same thing, they could even be empty as long as the signature matches.

Ok I need again your help if possible :slight_smile:
I have set up two different scenes, one for the client and the other for the server.
So now there is a single project containing the prefab of the object that I want to share beetween the hosts.
The server calls Network.Instantiate when starting (precisely inside the OnServerInitialized method) and when the client connects we receive this error: “Network.Instantiate on the receiving client failed because the asset couldn’t be found in the project”.
It seems the same problem that we had before. Now the prefab should really be exact the same.