Procedural animated mesh

I managed to create a script that procedurally makes a 2D ring shape.

Now I need to modify in real time the ring’s inner and outer diameter on every frame, and I don’t want to re-create the mesh every frame since that would be pretty slow.

How can I make this shape animated?

EDIT: If I were using OpenGL, I would send another set of vectors for each vertex with the direction from the center of the circle to the perimeter, and in the vertex shader move each vertex in that direction a distance set by an uniform. That way I would not be recreating (or even sending to the GPU) the shape on every frame. Can’t that be done in Unity?

You’re going to have to recreate it every frame if you’re changing the inner and outer diameter. It’s not slow unless your code is unoptimized, especially in this particular case since all you have to change are the vertices.