Generating filled N-Gon using a script

You can use EditableMesh to create custom meshes, and you can search online for an n-gon generation algorithm. And then set the EditableMesh’s verticies to match the verticies of the generated polygon.

EditableMesh tutorial by Catargo:

EditableMesh / EditableImage DevForum post: