How to execute actor class code when adding actor into the editor ?

Hello, I created a actor c++ class that generate a staticmesh, I’m actually generate the mesh in the constructor.
When I slide the class into the editor sometime it generate the mesh and sometime it just add a empty mesh.
Is there a method I should override to make it work every time ?

Thank you