How to convert from vertex_color to material and export FBX file I have some problem with my blender code export to fbx file. I set color by vertex_color and set mode is Vertex_paint. But when I export this object to fbx file and open in Unity it is not include color. I think the reason might be dont set color for material of object. So could you help me to convert ?
This is my code. Thank you so much for your help

import math

# mesh arrays
verts = []
faces = []

# mesh variables
numX = 10
numY = 10

# wave variables
freq = 1
amp = 1
scale = 1

#fill verts array
for i in range (0, numX):
    for j in range(0,numY):
        x = scale * i
        y = scale * j
        z = scale*((amp*math.cos(i*freq))+(amp*math.sin(j*freq)))
        vert = (x,y,z) 
        verts.append(vert)

#fill faces array
count = 0
for i in range (0, numY *(numX-1)):
    if count &lt; numY-1:
        A = i
        B = i+1
        C = (i+numY)+1
        D = (i+numY)
        face = (A,B,C,D)
        faces.append(face)
        count = count + 1
    else:
        count = 0

#create mesh and object
mesh = bpy.data.meshes.new("wave")
object = bpy.data.objects.new("wave",mesh)
#set mesh location
object.location = bpy.context.scene.cursor.location
bpy.context.collection.objects.link(object)

#create mesh from python data
mesh.from_pydata(verts,[],faces)
mesh.update(calc_edges=True)

vert_list = mesh.vertices
color_map_collection = mesh.vertex_colors
if len(color_map_collection) == 0:
    color_map_collection.new()
else:
    color_map_collection.active

color_map = color_map_collection['Col']
i = 0

for poly in mesh.polygons:
    for idx in poly.loop_indices:
        loop = mesh.loops[idx]
        v = loop.vertex_index
        final = (0.1,0.5,0.2,1)
        color_map.data[i].color = final     
        i += 1

bpy.context.view_layer.objects.active = object
bpy.ops.object.mode_set(mode='VERTEX_PAINT', toggle=False)
Unity is a game engine, not a vertex editing engine. While you can build or download tools to edit meshes inside of Unity, I'd advise you to stick to Blender for that. Unity displays everything similar to Eevee. If you assign a default material to an object in Eevee it also won't show vertex colors, unless you tell your material to read them. In Blender, you need a built-in node for that, in Unity you need a shader that can read and display them.
https://forum.unity.com/threads/finding-and-using-a-vertex-colors-shader.236366/
Unity will also omit any vertex color information in the build, unless you tell it to keep them.

This option is in the Player Settings.