mesh subtraction or boolean operation

I need to remove or subtract the intersecting part from the mesh using boolean operations at runtime.

I checked out with pb_CSG and my result was supposed to be like this.

But when i perform any of these boolean operation.

My result will be like this. It is not proper.

can anyone have a solution to this at runtime?

take a look on this previous thread: Boolean Subtraction Operations on Mesh
also, here is a repo doing what you want using CSG: MeshBoolean/Project/Assets/_Scripts at master · KaimaChen/MeshBoolean · GitHub

Still a WIP but this project has mesh Boolean ops

thanks for your reply,
Using that repo, it’s not creating the mesh.
8116466--1051601--Screenshot 2022-05-10 195848.png In that Image you can notice that the mesh is not updated. The subtraction is only done by the materials.

I need to create mesh at runtime using boolean operations.