中英文字体Fonts
ue 4 支持的中文字体与对应的材质//字体 UFont* TextFont = nullptr; { static ConstructorHelpers::FObjectFinder
ObjectFinder(TEXT("Font'/Game/Fonts/Font_MicrosoftYahei.Font_MicrosoftYahei'")); TextFont = ObjectFinder.Object; check(TextFont != nullptr); } //字体材质 UMaterialInterface* TextMaterial = nullptr; { static ConstructorHelpers::FObjectFinder
ObjectFinder(TEXT("Material'/Game/Fonts/Mat_Font_MicrosoftYahei.Mat_Font_MicrosoftYahei'")); TextMaterial = ObjectFinder.Object; check(TextMaterial != nullptr ); } 最后在把字体与材质应用到文本渲染组件
下载地址
用户评论