Hi, I have a question: I want to change color of a procedurally generated Mesh, a square, dark red by default. The problem is that it does not change color, it remains as red, whenever I try to change the color. I'm using these code to change the material color, but it's not working:

mat.albedo_color = color
set_surface_material(0, mat)

Maybe it has something to do with the fact that this mesh is procedurally generated?

Not sure if it's applicable for the procgen mesh, but I use modulate for 2D sprites and that does the trick.

Something like:

myNode.modulate = Color(redValue, greenValue, blueValue, alphaValue)
# Where myNode is the sprite which needs to change colour