Exemplo n.º 1
0
        void OnMessageNetworkBehaviourInitialized(byte[] data, ulong steamID)
        {
            MessageNetworkBehaviourInitialized message = ByteSerializer.FromBytes <MessageNetworkBehaviourInitialized>(data);

            if (objectsFromServer.TryGetValue(message.networkID, out NetworkObject networkObject))
            {
                networkObject.HandleNetworkBehaviourInitializedMessage(message.index, steamID);
            }
            else
            {
                Debug.LogError(nameof(GameClient) + " does not have " + nameof(NetworkBehaviour) + " " + message.networkID + "[" + message.index + "] and therefore cannot be initialized!");
            }
        }
Exemplo n.º 2
0
        void OnMessageNetworkBehaviourInitialized(byte[] data, ulong steamID)
        {
            MessageNetworkBehaviourInitialized message = ByteSerializer.FromBytes <MessageNetworkBehaviourInitialized>(data);

            networkObjects[message.networkID].HandleNetworkBehaviourInitializedMessage(message.index, steamID);
        }