歡迎來到unity學習、unity培訓、unity企業培訓教育專區,這裏有不少U3D資源、U3D培訓視頻、U3D教程、U3D常見問題、U3D項目源碼,咱們致力於打造業內unity3d培訓、學習第一品牌。jsp
下面咱們開始今天的Unity3D技能培訓。 咱們學習Unity3D培訓目標:讓U3D初學者能夠更快速的掌握U3D技術,自行製做修改素材,能夠獨立完成2D、3D小規模遊戲及網頁遊戲開發。學習
[csharp] view plaincopythis
- using UnityEngine;
- using System.Collections;
-
- public class Test : MonoBehaviour
- {
- public GameObject testBtn;
- public Font f;
- // Use this for initialization
- void Start()
- {
- UIEventListener.Get(testBtn).onClick += CreatLabel;
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-
- void CreatLabel(GameObject go)
- {
- UILabel label = NGUITools.AddChild<UILabel>(gameObject);
- label.trueTypeFont = f;
- label.text = "Test";
- }
- }
更多精彩請點擊 http://www.gopedu.com/3d