My public Vector2[] will not commit in the editor

I have a public Vector2 that I use for my extended editor as a set of vertices. I change each point through custom handles in the scene view and see the changes to each value in the inspector.

The problem is that when I hit play, the values often revert to an old set. And then when I stop play, the values are set to that old value still, and I lose work.

What do i have to do to ensure changes to my public array commit at run time?

EDIT: Clarity

Example

Here’s an example of what happens. I place the vertices, the array is set, I hit build and the the vertices change (and often delete themselves).

In my code the array is declared

public Vector2[] vertices;

And points are added be re initializing the array

public void AddPoint(Vector2 pos){

Vector2[] newVerts = new Vector2[vertices.Length+1];
		for(int i = 0; i < newVerts.Length; i++)
		{
			if(i < vertices.Length)
				newVerts _= vertices*;*_

* else*
_ newVerts = pos;
* }*_

* vertices = (Vector2[])newVerts.Clone();*
* }*

I’m sorry I didn’t mean to be unclear. My class is a MonoBehaviour subclass.

After more research I solved my problem though. I needed to add
[System.Serializable] at the top of my class and make the vertices private with [SerializeField] above their declaration. Then in my editor code after vertices were moved EditorUtility.SetDirty(tube).

It’s working now. Thank you for all your help.