Cant Shoot client, Unet
Hello, when i build my Multiplayer FPS game and hit Play in unity and create a LAN Host and then join the server with my build(NOTE! i am using UNET) it all works fine! BUT when i shoot the Client "player2 / the build" with the host it give me this error:
KeyNotFoundException: The given key was not present in the dictionary. System.Collections.Generic.Dictionary`2[System.String,Player].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150) GameManager.GetPlayer (System.String _playerID) (at Assets/Assets/Scripts/GameManager.cs:24) PlayerShoot.CmdPlayerShot (System.String _playerID, Int32 _damage) (at Assets/Assets/Scripts/PlayerShoot.cs:53) PlayerShoot.CallCmdPlayerShot (System.String _playerID, Int32 _damage) PlayerShoot.Shoot () (at Assets/Assets/Scripts/PlayerShoot.cs:43) PlayerShoot.Update () (at Assets/Assets/Scripts/PlayerShoot.cs:30)
But if i shoot the host(player1) with (player2 / the build) it all works fine!
Please help me with this!
Feel free to ask question and i will try to explain better if yo did not understand!
Your answer
Follow this Question
Related Questions
Unity hangs when opening a project. 0 Answers
What i can do with Type Load Exception Unity3d 0 Answers
Help getting Unite 2017 demo code to run, need to fix errors 0 Answers
different behaviors of the project in unity Editor and smart phone 0 Answers
[RESOLVED] Error? Black Screen! I can not move anything or click on anything! pls Help! 0 Answers