UE4 使用中文字

版权声明: https://blog.csdn.net/qq_21153225/article/details/82385647

UE4 的3D text中,需要使用TextRenderer组件,组件中使用中英文需要创建一个Font字体材质

首先在Content中创建一个Font

双击创建的字体,在出现面板的details中选择font cache type 中的offline

在字体选择中选择相应字体

在details中,选择 alpha only ,并在Chars中输入所需文字

在Assets中,选择Reimport xxxx(创建的font名称)

创建材质,修改Blend Mode 为 Masked

添加Vertex Color 和 Font Sample Parameter 在 Font Sample Parameter中选择刚刚创建的Font

在你的textRenderer组件的text处,分别选择Font字体和字体材质,并输入需要显示的字体

显示效果如下:

注意,不要将3500常用字全部放入Font文件中,本人测试后法线字体变的很奇怪,建议几百字内是可以放入Font中,在font的detail中需要修改长宽高等参数

猜你喜欢

转载自blog.csdn.net/qq_21153225/article/details/82385647