Networked Camera.main throws error on non-master clients

Options
I've currently got a 2-player game in the works and the first player can join the server with no relevant errors. The camera starts as expected and they're presented with a waiting for players screen as they should be. However, when I try to join second from the editor, I get a NullReferenceException on code that tries to enable Camera.main. Is it not possible to use Camera.main on networked player characters? The main camera does NOT have a PhotonView, but the player character parent does. I thought Camera.main was a local call and networking didn't matter, but there seems to be something involved.

I've scoured my code and have confirmed that I'm not doing anything manually to network the camera in any capacity. I realize it's a fairly simple fix to not use Camera.main, but I feel like there's something I'm missing and I want to understand what's going on.

Comments

  • vadim
    Options
    It should not be related to networking.
    Do you have "Main Camera" in scene?
    It's there by default and should be available on both clients until someone removes it I guess.