void Start() { Events.DragStart += DragStart; Events.DragEnd += DragEnd; Events.DragStartGameObject += DragStartGameObject; icons = Instantiate(_icons); icons.transform.SetParent(transform); icons.transform.localPosition = Vector3.zero; DragEnd(); }
public static void Error(this Html5.HTMLDivElement div, string title, string message, UIIcons icon = UIIcons.Alert) { var para = new Html5.HTMLParagraphElement(); para.AppendChild(new Html5.HTMLSpanElement() { ClassName = "ui-icon " + icon.ToString() }); para.AppendChild(new Html5.HTMLElement("strong") { TextContent = title }); para.AppendChild(new Html5.Text(message)); div.AppendChild(para); div.ClassList.Add("ui-state-error"); div.ClassList.Add("ui-corner-all"); }
private void OnEnable() { icons = Camera.main.GetComponent <UIIcons>(); col = GetComponent <SphereCollider>(); }