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.

Resolved "Adding NetworkVariable {name}" spam on object selection

Discussion in 'Netcode for GameObjects' started by LaneFox, May 1, 2023.

  1. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,398
    Why does NGO log this every time I select a gameobject with a NetworkBehavior component? This does not seem useful and I don't see anything I've done that would be causing this as the classes are very simple.

    When is it expected to log this out and why do I always see it?

    Code (csharp):
    1. // Logs for this variable every time.
    2. public class NetworkedStateObject : NetworkBehaviour
    3. {
    4.     public NetworkVariable<int> StateObjectId = new NetworkVariable<int>();
    5. }
    Code (csharp):
    1. // Logs for the base class and these variables every time.
    2. public class Pointer : NetworkedStateObject
    3. {
    4.     public NetworkVariable<Vector3> EndPoint;
    5.     public NetworkVariable<bool> IsOn;
    6. }
    Adding NetworkVariable StateObjectId

    Adding NetworkVariable EndPoint

    Adding NetworkVariable IsOn
     
  2. NoelStephens_Unity

    NoelStephens_Unity

    Unity Technologies

    Joined:
    Feb 12, 2022
    Posts:
    110
    LaneFox,
    That looks like a debug log that wasn't removed for PR-2364 and should be removed.
    Created PR-2562 to remove this in the next patch.
     
    LaneFox likes this.