unity c# 3D TextMeshPro控件 设置字体

            TextMeshPro text = textobj.GetComponent<TextMeshPro>();
            text.text = "测试";
            text.fontSize = 30;

            text.fontMaterial = Resources.Load<Material>("Font/FontMaterials/STHEITI SDF Material WhiteTitle");
            text.font = Resources.Load<TMP_FontAsset>("Font/FontAssets/STHEITI SDF");

猜你喜欢

转载自blog.csdn.net/qq_21743659/article/details/131102711
今日推荐