鸟语天空
GUIContent
post by:追风剑情 2015-11-26 17:45

using UnityEngine;
using System.Collections;

public class GUITest : MonoBehaviour {

    public Texture texture;
    public string text = "button text";
    public string toolTip = "button toolTip";

	void OnGUI () {

        if (GUILayout.Button(new GUIContent(text, texture, toolTip)))
        {

        }
	}
}

运行效果

run.png

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容