Search Unity

photon server and unity

Discussion in 'Scripting' started by Loki1991, Oct 29, 2014.

  1. Loki1991

    Loki1991

    Joined:
    Oct 24, 2014
    Posts:
    4
    okay so this is the way everything is set up atm. i have my photon server script that inherits the IPhotonListener and then i have a login script and a chat script.

    so far i have on scene 1 the login script attached to a empty game object running and it connects to the server script. i have it connecting just fine and i even have an actual username and password request going and that all works just fine so im getting and receiving messages from the client and the server perfectly. however now when i load scene 2 ( the game world ) using application.loadlevel ("level01") and the chat script is running if i try and send a chat message i get the

    nullreferenceexception: object reference not set to an instance of object

    and i don't know why. what do i need to post to get some assistance on this? i have also asked the same question on the photon forums but the problem seems to be associated with unity and not the photon side but i could be wrong