MultiplayerFPS-Tutorial icon indicating copy to clipboard operation
MultiplayerFPS-Tutorial copied to clipboard

NullReferenceException(muzzleflash)

Open sanjyot-dahale opened this issue 5 years ago • 0 comments

The error is as follows:

NullReferenceException: Object reference not set to an instance of an object PlayerShoot.RpcDoShootEffect () (at Assets/Scripts/PlayerShoot.cs:74)

Now the problem is that this error does not arise till the 2nd player joins the lobby. Once the second player joins the room, the 1st player(host of the room) starts getting this error.

So if I launch (host) the room from the Build and join the room from Unity itself, the Unity Player can do everything, but once he starts shooting, you cannot see his shooting in the Build game and the Build Player also cannot shoot and the NullReference error starts popping up. Then if the Unity Player kills the Build Player by shooting him, he only dies in the Unity Game and nothing happens in the Build Game.

sanjyot-dahale avatar Mar 07 '19 08:03 sanjyot-dahale