Making a Multiplayer FPS in Unity / NEED HELP

Updated on February 22, 2017 in Unity
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
2 on February 15, 2017

hello guys i follow Brackeys for a long time
and now i am following the series Making a Multiplayer FPS in Unity
i did come till E17 Matchmaking.
And when i did test the game i did get an error

if i click on the error i come to here

the problem is i can just play fine
but when i die or exit game the SceneCamera is not enabeling but the PlayerUi does?
If i Exit:
if i Die: 
i think it is a typo but i couldn’t found anything sorry
i am really a beginner
can some help please.

  • Liked by
Reply
0 on February 20, 2017
  • Liked by
Reply
Cancel
0 on February 22, 2017

on line 63, I’m guessing there’s no value for wasEnabled[i]. 
I’d suggest debugging it a bit further by changing your for loop to this:

Debug.Log("About to test (i="+i+")");
disableOnDeath[i].enabled = wasEnabled[i];
Debug.Log("Successfully manipulated (i="+i+")");

Then, the error should pop up before the successful Debug, but after the ‘About to Test’ debug.
 
Just an idea. Maybe see if that helps narrow down the problem…

  • Liked by
Reply
Cancel