Search Unity

Third Party photon networking impossible bug

Discussion in 'Multiplayer' started by NikoBusiness, Sep 21, 2014.

  1. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    guys i dont know if its photon networks responsibility or unitys or mine.
    my problem is that when i join a room and press play botton i instantiate a prefab bla bla bla...& i disable the main camera for lowering the drawcalls then when i connect with another unity instance ( I TRIED IT WITH STANDALONE AND EDITOR VIEW) and game loads the main camera is disabled how is that possible? PLEASE HELP!

    this is the code Camera.main.enabled = false;
     
  2. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    300
    why are you disabling your camera? Are you trying to put photonview on your camera gameobject?
     
  3. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    because i have camera attached to the player that follows the player
     
  4. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    300
    disable the camera in the prefabe and try if(photonview.isMine){camera.main.enabled == true} when you instantiate or maybe you are networking with several cams tagged as main camera?
     
  5. RensDevolp

    RensDevolp

    Joined:
    Aug 10, 2014
    Posts:
    31
    You should see this video for disabeling camera's on pun:
    , and then at 24 min.