1.Label 控件 编写脚本文件,直接绑定在main camera上 public class labelScript : MonoBehaviour { //设定一个值来接收外部赋值的字符串 public string str; //接收外部赋值贴图 public Texture imageTexture; //设定私有变量,只可以在脚本内访问的 private int imageWidth; private int imageHeight; private int screenWidth;…
C#文字: public class NewBehaviourScript2 : MonoBehaviour { public Texture t; public GUISkin skin; // Use this for initialization void Start () { } void OnGUI(){ GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height)); GUI.skin = skin; GUILa…