本文参考自 http://forum.china.unity3d.com/thread-1099-1-1.html 使用NGUI版本3.7.5. 在创建了一个UIRoot后,有时会报NullReferenceException的错误,如下图.虽然报错但是不影响运行. 截取部分报错输出是 NullReferenceException: Object reference not set to an instance of an object UIPanel.get_worldCorners () (
有一次因为 ttf 分成简体和繁体两个..所以就需要动态改变NGUI 中 UILabel 的字体,但是不知道 UILabel 保存字体的字段是哪个 网上搜到..在这里记录一下 using UnityEngine; using System.Collections; public class ChangeFont : MonoBehaviour { public UILabel label; public Font otherFont; void Start() { label.trueTypeF