How to create dynamic body and collider from mesh in code?

I’m creating ECS entities purely in code from procedurally generated meshes and I want to add DOTS Physics components.

How do I create the relevant PhysicsCollider, PhysicsMass, PhysicsVelocity, etc. components from this mesh in code? Is there an example somewhere of how to do this?

I’ve been delving into the authoring components and it looks like a rather complex process. It sure would be nice to have some helper functions that take a mesh and produce the components needed.

I suggest you take a look at Unity’s EntityComponentSystem Samples.
https://github.com/Unity-Technologies/EntityComponentSystemSamples
This repo contains UnityPhysicsSamples/ with several demos of using DOTS physics.