Set anchor point for procedural mesh?

How can I set the anchor point of a procedural mesh to its centre?

I need to rotate it around its centre and I’m having trouble doing it any other way.

I haven’t worked that much with procedural meshes in Unity before, so is there any easy way to do this?

Just like a mesh made in an editor, the anchor point (pivot point) is automatically where-ever (0,0,0) is. If you built it with Y always 0 or more, the pivot is on the bottom. Build it with Y running from -5 to 5, same for X and Z, the pivot will be centered.

Since it’s your mesh, you could recenter it by finding the low/high X values, average them, and subtract from X of each vert (to put the center at 0.) Or just guesstimate and toss in a loop to add (??, ??, ??) to each of your verts. This is the equivalent of, in the modelling program, grabbing all the verts (not the model,) and dragging it a bit.

Or just use the parent trick, same as any other mesh.