提要:以前是UNITY4,后来用了新的UI,于是GUIText这种东西就没有了,研究了很久.... ---------------------------- 这里我想拖个GUI文字框显示FPS,于是代码是这样,这段代码是我在UNITY官方BBS找到并修改的,感谢原作者分享 using UnityEngine; using System.Collections; using UnityEngine.UI; //引用里加入这个 public class getFPS : MonoBehaviour
1在代码中添加文字阴影 TextView 有一个方法 /** * Gives the text a shadow of the specified radius and color, the specified * distance from its normal position. * * @attr ref android.R.styleable#TextView_shadowColor * @attr ref android.R.style
这一篇将继续介绍gg库中绘制文字相关的方法,主要包括:DrawStringAnchored().DrawStringWrapped().MeasureMultilineString().WordWrap()下面来分别进行介绍. DrawStringAnchored 如果不细究,可能会觉得这个方法是 DrawString() 方法的一个封装,但看看里面的实现就能发现,实际情况正好相反. // DrawString draws the specified text at the specified