How to change BaseColor in UMaterial in C++

I want to change basecolor of an Actor 's materia in C++(just like the picture below in blueprint). And I find a private member FColorMaterialInput BaseColor in UMaterial. But I can’t find a function like setBaseColor(R,G,B) to change basecolor. Can anybody tell me how to do that?

Have a look at this tutorial:


Thanks for your reply! It seems that I have used the wrong method, and now I have solve the problem.