示例#1
0
 // Set the unity object tag
 public void ApplyTag(string tag)
 {
     textObj.tag    = tag;
     background.tag = tag;
     if (border != null)
     {
         border.SetTag(tag);
     }
 }
示例#2
0
 // Function to alter the tag of the button (unity classification)
 public void ApplyTag(string tag)
 {
     button.tag     = tag;
     background.tag = tag;
     border.SetTag(tag);
 }
示例#3
0
 // As above, but with
 // c: colour for the border
 public void AddBorder(Color c)
 {
     UnityEngine.Rect rect = background.GetComponent <RectTransform>().rect;
     border = new RectangleBorder(background.transform, c, new Vector2(rect.width / UIScaler.GetPixelsPerUnit(), rect.height / UIScaler.GetPixelsPerUnit()));
     border.SetTag(textObj.tag);
 }