Imported mesh doesnt share vertices

When i import a simple cube from 3dmax to unity, it says there are 24 vertices instead of 8 and triangles dont use shared vertices while forming.
I did use smoothing groups as well but it didnt help either. How to solve this?

It is possible to import a cube with only 8 vertices in Unity (tried it with Cinema4D). Of course it is not allowed to have multiple normals or UVs per vertex as this would lead to a splitting but I guess you have made sure of that.
Maybe 3Dmax exports only 24 vertices in the first place or your model faces are not “merged”?

The default cube in Max has 6 material ids and planar uv mapping per face applied to it so it will generate 24 vertices regardless of smoothing groups, if you add an edit poly modifier and apply a single material id and then apply uv map modifier and use a mapping method that results in shared uv coords then you should end up with 8 vertices (you will need to apply a single smoothing group as well)

Easier to just generate your own cube mesh via scripting.

I did apply a single material with uvmap modifier and set mapping to face but still 24 vertices.
Yes its easier to create own cube but it was just for testing, actual models are more complicated.

Setting mapping to face will make 24 vertices as that is the standard uv mapping, you need to apply something like planar mapping so uv coords are the same at the vertices.