Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question NetworkObject disable trigger events

Discussion in 'Netcode for GameObjects' started by CodeExc, Dec 12, 2021.

  1. CodeExc

    CodeExc

    Joined:
    Oct 31, 2016
    Posts:
    8
    Hi,

    I have a NetworkObject with a BoxCollider as trigger.
    When the host call the OnTriggerEnter() event, the event is also triggered on the clients.
    It does not work from the clients to the host-side.

    Can I disable these network events and only call them on the respective client?
    Otherwise I get problems in the ServerRpc() methods, because they are always called multiple times on the client.