Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Discussion A TIP in the documentation is not possible to implement as-is

Discussion in 'Netcode for GameObjects' started by neviovalsa, Jun 7, 2023.

  1. neviovalsa

    neviovalsa

    Joined:
    Jun 24, 2019
    Posts:
    54
    Hello,
    this is very small issue but I thought maybe a quick fix to the docs could avoid some confusion

    I was reading the following section on Scene Events: https://docs-multiplayer.unity3d.co...ts/#tracking-event-notifications-onsceneevent .

    The tip just below the code snippet says:

    This code can be applied to a component on your GameObject that has a NetworkManager component attached to it. Since the GameObject, with the NetworkManager component attached to it, is migrated into the DDOL (Dont Destroy on Load) scene, it will remain active for the duration of the network game session...

    Since the code snippet contains checks such as
    Code (CSharp):
    1. if (IsServer){
    2. ...
    3. }
    this snippet should be a NetworkBehaviour, which can't be attached to a NetworkManager.
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Hi @neviovalsa , thanks for flagging. Do you know that you can make the change yourself with the "Edit this page" link at the bottom of the documentation's page?