protected override void OnPopulateMesh(VertexHelper vh) { vh.Clear(); UIMeshGenerationHelper.AddLine(vh, _startWorld, _endWorld - _startWorld, _style.Width, _colors.GetForState(_state).Value, UIMeshGenerationHelper.CapsType.Round); }
public void UpdateUI(string labelString, Vector3 labelPositionWorld, CoordinateUIStyle.LabelStyle style, CoordinateUIStyle.ColorSet colors, SketchStyle.State state) { _label.text = labelString; _label.color = colors.GetForState(state).Value; _label.fontSize = style.FontSize; var anchoredPosition = WorldScreenTransformationHelper.WorldToUISpace(GetComponentInParent <Canvas>(), labelPositionWorld); GetComponent <RectTransform>().anchoredPosition = anchoredPosition; }