void LateUpdate()
    {
        if (peerType == EasyWiFiConstants.PEER_TYPE.Client)
        {
            //we are the client we are responsible for triggering the send of Easy WiFi Controllers data structure over
            //the network and because of this we want to order this script to run after the others

            if (EasyWiFiController.clientState == EasyWiFiConstants.CURRENT_CLIENT_STATE.SendingControllerData)
            {
                //send the data
                if ((Time.realtimeSinceStartup - lastSendTime) > maxRate)
                {
                    lastSendTime = Time.realtimeSinceStartup;
                    EasyWiFiController.sendWiFIControllerData(EasyWiFiController.createControllerDataMessage(packetNumber));

                    //increment the packet number
                    if (packetNumber < EasyWiFiConstants.ROLLOVER_PACKET_NUMBER)
                    {
                        packetNumber++;
                    }
                    else
                    {
                        packetNumber = 0;
                    }
                }
            }
        }
        else
        {
            //send the backchannel (if present)
            if (serverSendBackchannel)
            {
                //server backchannels are for feeding back UI elements to the controller and are less sensitive
                //like in the racing example it animates the spedometer
                //so we cap this at 30 times per second
                if ((Time.realtimeSinceStartup - lastSendTime) > .033333333f)
                {
                    lastSendTime = Time.realtimeSinceStartup;
                    EasyWiFiController.createAndSendBackchannelMessages(packetNumber);

                    //increment the packet number
                    if (packetNumber < EasyWiFiConstants.ROLLOVER_PACKET_NUMBER)
                    {
                        packetNumber++;
                    }
                    else
                    {
                        packetNumber = 0;
                    }
                }
            }
        }
    }