private void FixedUpdate()
    {
        if (lastMeshDownlinkTime + 10.0f < Time.realtimeSinceStartup)
        {
            // you can't block here and wait for the camera capture.
            // Send the old data and trigger a new capture.
            // NetworkMeshSource.getSingleton()
            for (int index = 0; index < SurfacesList.Count; index++)
            {
                SurfaceEntry item = SurfacesList[index];
                if (item.m_BakedState == BakedState.Baked || item.m_BakedState == BakedState.UpdatePostBake)
                {
                    GameObject go = item.m_Surface;
                    if (go)
                    {
                        MeshFilter[] meshFilters = go.GetComponents <MeshFilter>();
                        for (int mfi = 0; mfi < meshFilters.Length; mfi++)
                        {
                            MeshFilter MFer = meshFilters[mfi];

                            if (MFer)
                            {
                                Mesh meesh = MFer.mesh;
                                if (meesh && meesh.triangles.Length > 0)
                                {
#if !UNITY_EDITOR
                                    PMT.sendMesh(go.transform.position, go.transform.rotation, meesh);
#endif
                                }
                            }
                        }
                    }
                }
            }
            lastMeshDownlinkTime = Time.realtimeSinceStartup;
        }
    }
    private void FixedUpdate()
    {
        if (!PhotonNetwork.InRoom)
        {
            return;
        }
        if (PMT == null)
        {
            PMT = PhotonMeshTransfer.getSingleton();
        }
        //DONT PISS OFF PHOTON BY SENDING TOO FREQUENTLY! THEY WILL KICK YOU!
        if (lastMeshDownlinkTime + deltaTimeAveraged + deltaTimeAveraged * 0.001f * lastMeshSize * (ConnectAndJoinSpaace.disconnectCount + 1) < Time.realtimeSinceStartup)
        {
            SurfacesList.Sort();
            // you can't block here and wait for the camera capture.
            // Send the old data and trigger a new capture.
            // NetworkMeshSource.getSingleton()
            for (int index = 0; index < SurfacesList.Count; index++)
            {
                SurfaceEntry item = SurfacesList[index];
                if (item.m_BakedState == BakedState.Baked || item.m_BakedState == BakedState.UpdatePostBake)
                {
                    //Debug.LogWarning("Mesh " + item.m_Id + " has baked state " + item.m_BakedState);
                    GameObject go = item.m_Surface;
                    if (go)
                    {
                        MeshFilter[] meshFilters = go.GetComponents <MeshFilter>();
                        for (int mfi = 0; mfi < meshFilters.Length; mfi++)
                        {
                            MeshFilter MFer = meshFilters[mfi];

                            if (MFer)
                            {
                                //Debug.LogWarning("Mesh " + item.m_Id + " has a mesh filter");
                                Mesh meesh = MFer.mesh;
                                if (meesh && meesh.triangles.Length > 0)
                                {
                                    //Debug.LogWarning("Mesh " + item.m_Id +" is of length "+ meesh.triangles.Length);
                                    if (Time.realtimeSinceStartup - item.lastSentTime > 30.0f)
                                    {
                                        if (PMT == null)
                                        {
                                            Debug.LogWarning("PMT IS NULL! Can't send mesh " + item.m_Id);
                                        }
                                        //just send one and return;
                                        item.lastSentTime = lastMeshDownlinkTime = Time.realtimeSinceStartup;
                                        PMT.sendMesh(go.transform.position, go.transform.rotation, meesh);
                                        lastMeshSize = meesh.triangles.Length;

                                        //add any meshes we send to the minimap
                                        MiniMapHandler.getSingleton().addElement(meesh, go.transform.position, go.transform.rotation);
                                        //Debug.LogWarning("Mesh transer initiated on index " + item.m_Id);
                                        return;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            lastMeshDownlinkTime = Time.realtimeSinceStartup;
        }
    }