public static NetWriter StartNetworkMessage(string functionName, NetworkID senderID)
    {
        if (writer.isWriting)
        {
            Debug.LogWarning("Tried to start writing another message when one is already being written. Please finish and send the first message before starting another one.");
            return(null);
        }
        writer.Reset(writeData, NetworkCore.MAX_DATA_SIZE);
        writer.StartWriting();
        // write the sender id
        senderID.WriteBytes(writer);
        // write the destination function id
        ushort functionID = (ushort)FindIdForName(functionName);

        writer.WriteUShort(functionID);
        return(writer);
    }