#Multiple NetworkManagers

1 messages · Page 1 of 1 (latest)

dapper glen
#

Hello, I have a strange problem.

I work in a local network with three computers. I use one as a server and the other two are supposed to join as clients. When I build the VR application, it works partially. The two clients join and can also move separately from each other, but when one of them presses the grab button, it is triggered on both clients. When I try to start it in the editor, it doesn't work at all. In the console, I get a message saying that I am trying to create another network manager even though one is already active. Sometimes I get the same message, only that the client/host is already there. It seems to me as if the individual PCs are all assigned the same ID or there is another authority problem. Attached are two screenshots of the settings in the network manager. Can anyone tell me what I can do to fix the problem?

Thank you in advance for any help.

hasty raven
#

The grab code, if its on player prefab, needs to be in a isLocalPlayer or isOwned check.
See Mirrors examples and the Update function.

#

If the grab code is not on player prefab, its not being linked to correct player scripts. (rough code, so here on player prefab, we are telling our script in the scene which is our local player)

public void Start()
    {
        if (isLocalPlayer)
        {
            playerGrabScript.playerScript = this;