Netcode NetworkBehaviour IsServer/IsClient/IsHost

I’ve set up a new project and added the “com.unity.netcode.gameobjects” (v 1.0.0-pre.9).

Just adding a NetworkManager w/ corresponding script component and a GameObject “NetvarsManager” with a script attached:

using Unity.Netcode;
using UnityEngine;

public class NetvarsManager : NetworkBehaviour
{

    void Start()
    {
        NetworkManager.Singleton.OnServerStarted += OnServerStarted;
        NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
    }

    void OnServerStarted()
    {
        Debug.Log("OnServerStarted");
        Debug.Log("IsServer: " + IsServer);
        Debug.Log("IsClient: " + IsClient);
        Debug.Log("IsHost: " + IsHost);
    }

    void OnClientConnected(ulong id)
    {
        Debug.Log($"Client connected (id {id})");
        Debug.Log("IsServer: " + IsServer);
        Debug.Log("IsClient: " + IsClient);
        Debug.Log("IsHost: " + IsHost);
    }
}

When starting the Player and Clicking “Start Host” in the properties of the running NetworkManager instance, the following gets logged:

197010-log.png

I don’t understand why the “OnClientConnected” callback states “false” for all three of IsServer/IsClient/IsHost. Shouldn’t it be true, just like in the “OnServerStarted” callback?

Apparently these flags are set after the “OnClientConnected” callback. So if you wait for one frame, they go to true;