UMG as Mateiral?

Hi,I am a newcomer to ue4 and c++,could you show me the function code in c++?