static void CopyVectorArrayFromMesh(IntPtr dest, int destSize, int byteCount, Mesh mesh, VertexElement element, List <int> subMeshIndices)
        {
            switch (element.ComponentCount)
            {
            case 2:
            {
                Vector2[] data = null;
                element.GetAsVec2(mesh, subMeshIndices, ref data);
                VertexBakerLib.Instance.CopyVector2Array(dest, destSize, data, byteCount);
            }
            break;

            case 3:
            {
                Vector3[] data = null;
                element.GetAsVec3(mesh, subMeshIndices, ref data);
                VertexBakerLib.Instance.CopyVector3Array(dest, destSize, data, byteCount);
            }
            break;

            case 4:
                if (element.GetElType == VertexElementType.kColor)
                {
                    Color[] data = null;
                    element.GetAsColor(mesh, subMeshIndices, ref data);
                    VertexBakerLib.Instance.CopyColorArray(dest, destSize, data, byteCount);
                }
                else
                {
                    Vector4[] data = null;
                    element.GetAsVec4(mesh, subMeshIndices, ref data);
                    VertexBakerLib.Instance.CopyVector4Array(dest, destSize, data, byteCount);
                }
                break;

            default:
                break;
            }
        }