怎样编程,以便我可以更改字体类型:联盟或宋体...
这是我当前的代码...
using UnityEngine;
using System.Collections;
public class InvSlotHandler : MonoBehaviour {
private int excess = 1;
UILabel lbl;
void Start() {
GameObject label = new GameObject();
lbl = label.AddComponent<UILabel>();
label.transform.name = "#QTY";
lbl.fontStyle = FontStyle.Normal;
lbl.fontSize = 15;
lbl.alignment = NGUIText.Alignment.Right;
NGUITools.AddChild (gameObject.transform.gameObject, label.gameObject);
}
void FixedUpdate() {
lbl.text = gameObject.transform.childCount - excess + "";
}
}