12 lines
336 B
C#
12 lines
336 B
C#
using UnityEngine;
|
|
|
|
public static class StringExtensions
|
|
{
|
|
public static string ColorWrap(this string text, Color color)
|
|
{
|
|
string hexColor = ColorUtility.ToHtmlStringRGB(color);
|
|
return $"<color=#{hexColor}>{text}</color>";
|
|
}
|
|
|
|
public static string UnderlineWrap(this string text) => $"<u>{text}</u>";
|
|
} |