Hello i have a annoying problem with material color and i need help!

So my problem is when i change the material color of my object during runtime
Then after that i exit runtime the object color material changed to the color in the runtime. I want to keep the material color of the object before the runtime.

Im not sure what your use case is but you could try to create a new material at runtime based off the current material. Then you can adjust its settings, including color, during runtime. when you exit play mode the original material will be used and youll see the original color before you adjusted it in runtime.

public Renderer mesh;
private Material mat;

    private void Start()
    {
        mat = new Material(mesh.material);
        mesh.material = mat;
    }

    public void ChangeMaterialColor(Color col)
    {
        mat.color = col;
    }