第一种刷新文字形式 using UnityEngine; using System.Collections; using UnityEngine.UI; public class SensorTextRefresh2 { // Use this for initialization string showstring; public Text _text; public string otherName = "normal"; string current; RefreshState
参考链接: http://www.manew.com/thread-100366-1-1.html https://www.jianshu.com/p/3082ebf8a342 https://blog.csdn.net/serenahaven/article/details/80972601 1.RaycastTarget的检测 using UnityEngine; using UnityEngine.UI; public class DrawRaycastTarget : MonoBehav
using UnityEngine;using System.Collections; public class PlayerController:MonoBehaviour{ public UnityEngine.UI.Text winText; void Start(){ winText.text = "You Win!"; winText.gameObject.SetActive (false); //hide winText }
Character Text 文本字体的编辑 Font Style 字体格式可以自行下载也可在windows自带字体中查找 Font Size 字体尺寸 Line Spacing 行距 Rich Text 副文本 可插入标签进行颜色.字体.大小的更改 <size=41>HELLO</size> Paragraph Alignment 对齐方式 Align By Geometr 是否通过几何对齐方式 Horizontal Overflow 水平溢出 Vertical Overflo
1.Vector3坐标 2.地球,月球,太阳的旋转关系 using System.Collections; using System.Collections.Generic; using UnityEngine; public class spere01 : MonoBehaviour { public GameObject moon; public GameObject sun; // Use this for initialization void Start () { } // Updat
Chapter 1: Looking Back,LookingForward Chapter 2: Building Layouts Chapter 3: Control, Control, You Must Learn Control Chapter 4: Anchors Away Chapter 5: Screen Space, World Space, and the Camera Chapter 6: Working with the UI Source Chapter 1: Looki
一.图片的Inspector面板属性 Texture Type:一般是选择sprite(2D and UI) Sprite Mode:一般是选择Single Packing Tag:打包的标志值,最后打包的时候会把Tag相同的所有小图打包成一个大图.不像cocos打包图集需要用到第三方软件,这里Unity会帮我们把相同Tag的图片打包成大图,非常方便. Pixels Per Unit 100:表示100像素为1个Unity单位(1米),也可以在Scene视图中看出,640X960分辨率的图片在视