how to change the material of the object using c++ without blueprint in vr

not as dynamic material. i had an option to change the material like use to image button…
how to did it