NullReferenceException

Hello guys:

Im just new to Unity and im following this Tutorial to make a PhotonView multiplayer game. In the end of this tutorial

when I run my project it throws me this error.

NullReferenceException: Object reference not set to an instance of an object
PhotonPlayer.Start () (at Assets/TacticsMultiplayer/Scripts/GameControllers/PhotonPlayer.cs:15)

Line 15: int spawnPicker = Random.Range(0, GameSetUp.GS.spwanPoints.Length);

The video is really easy so if anyone can help me i would apreciate it!

Thanks you :smile:

Try to put a breakpoint at line 15 and debug your app. You should be able to see which variable of GameSetUp, GS, spwanPoints is null. I would guess that you may not have dragged the proper game objects into the spwanPoints variable in Unity Editor.