Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How do a Netcode build handle normal scripts? means scripts without networkbehavior

Discussion in 'Multiplayer' started by CosmusOne, Apr 7, 2023.

  1. CosmusOne

    CosmusOne

    Joined:
    Feb 7, 2021
    Posts:
    6
    Hi i have a question about that. I have made a game almost finish now. I see that some scripts run double without Networkbehavior on it. Is this normal?

    Thx for replay
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,333
    Scripts without NetworkBehaviour are simply ignored.
    For example, Mirror's NetworkIdentity class calls GetComponents<NetworkBehaviour>.
    That's all it looks at.
    Every other component behaves the default Unity way :)
     
  3. CosmusOne

    CosmusOne

    Joined:
    Feb 7, 2021
    Posts:
    6
    i have found the problem but good to now thx :)