[Canvas its RenderMode is set to ScreenSpaceOverlay]
transform.position = Input.mousePosition;
[Canvas its RenderMode is set to Other]
[Canvas its RenderMode is set to ScreenSpaceOverlay]
transform.position = Input.mousePosition;
[Canvas its RenderMode is set to Other]

有些時候我們需要一個按鈕不是方形如下圖
我們需要點擊到該圖案才觸發按鍵效果
這時候可以設定
Image image = GetComponent<Image>();
image.alphaHitTestMinimumThreshold = 0.1f;
在上面的Menu上增加一個自訂的項目,在方法上使用該方法必須是static
在UnityEditor的Component的Menu中增加自訂項目

這邊使用UGUI 來實作
1. 首先加入 Scroll View (右鍵 -> UI - > Scroll View)
2.在Scroll View底下的Content 加上Vertical Layout Group
3. 在Scroll View底下的Content 加上Content Size Fitter 並把fit 改為 Prederred Size (這邊是直立式的滑動 如果是橫的就是Horizontal Fit 改成Prederred Size)內容下圖
4. 在Content物件底下的Item 掛上 Vertical Layout Group
物件增加BoxCollider 並放上 物理材質球(Jump)
給初始速度 大於2 (會反彈)
如果小於等於2 (不會反彈)
可以在Edit->project setting->physics里面有一个Bounce Threshold,默认是2 ,改成0就好了

在Unity裡面正常的c# 宣告一個event 必須要使用 程式碼去增加監聽事件
但是使用UnityEvent 可以使用編輯器去手動增加要監聽的事件
就像使用UGUI EventTrigger
PS: UnityEvent 的效能比event的效能還差 但是開發上會較為簡單
載點
https://drive.google.com/open?id=0B4c7FeGn1Y0jbU5CNE5JM3czUkU
使用方法 :
呼叫DownloadSystem.ToStreamAssets(檔案的網址, 下載到的位置)
可以從該網址抓取檔案 下載到StreamAssets底下指定的位置
public void OpenMail_(){
string email = "aa@gmail.com";
string subject = MyEscapeURL("My Subject");
string body = MyEscapeURL("My Body\r\nFull of non-escaped chars");
Application.OpenURL("mailto:" + email + "?subject=" + subject + "&body=" + body);
載點
https://drive.google.com/open?id=0B4c7FeGn1Y0jVUwxX2JCaFkySnM
使用方法 :
在有Grid Layout Group 底下的Image物件掛上DragExchangeImage
就能 用拖曳的方式去改變 Image的排列