本文主要是介绍unity的ugui中文竖排,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
直接上图
直接上代码:
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;[ExecuteInEditMode]
public class VirticalText : BaseMeshEffect
{[Tooltip("字和字之间的距离")]public float spacing = 1;private float lineSpacing = 1;private float textSpacing = 1;private float xOffset = 0;private float yOffset = 0;public override void ModifyMesh(VertexHelper helper){if (!IsActive())return;List<UIVertex> verts = new List<UIVertex>();helper.GetUIVertexStream(verts);Text text = GetComponent<Text>();TextGenerator tg = text.ca
这篇关于unity的ugui中文竖排的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!