Search Unity

Question Can anyone help me?

Discussion in 'Netcode for GameObjects' started by jairneto55, Jan 25, 2023.

  1. jairneto55

    jairneto55

    Joined:
    Nov 30, 2022
    Posts:
    1
    I have this code made on the mirror and I wanted to convert it to Netcode.

    Code (CSharp):
    1.         public override void OnStartAuthoraty()
    2.         {
    3.             base.OnStartAuthoraty();
    4.             PlayerInput playerImput = GetComponent<PlayerInput>();
    5.             playerImput.enabled = true;
    6.            
    7.         }
    From the looks of it, when I enter a server, the second camera is used as a base and I can no longer control the first one and I think this code can help me.
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Hi @jairneto55 , have you already had a look at the examples in the official ClientDriven sample to see how to manage this?

    If not, you can download it here