Search Unity

Camera not working after build/ multiplayer

Discussion in 'Multiplayer' started by Lifee00, Dec 3, 2022.

  1. Lifee00

    Lifee00

    Joined:
    Apr 13, 2021
    Posts:
    86
    Hi, I have only one camera prefab 2D, whenever a new player enters the game, the camera will follow that player. Everything works fine when I test it without making a build. Every time I hit the build button, it stops working after that. Is this unity bug or am I doing something wrong here?

    I am using mirror, if it matters. Thank you.


    EDIT: Somehow there was a second camera on some random object and unity build forced the the script somehow to detect that second camera instead. Strange, but fixed it.
     
    Last edited: Dec 3, 2022