/// <summary> /// Generate rects between startID and endID on userString in textRect /// </summary> private Rect[] GetRects(int startID, int endID, Vector2 offset) { //Reorder select IDs int min = Mathf.Min(startID, endID); int max = Mathf.Max(startID, endID); //Rebuild lines if needed if (lines == null) { lines = LinesPack.FromText(userString, textRect, Styles.textStyle); } //Return rects generated between start - end return(lines.GetRects(min, max, Styles.textStyle, offset + new Vector2(-1, 2))); }
private void RefreshLines() { lines = LinesPack.FromText(userString, textRect, Styles.textStyle); }