Skip to content

Instantly share code, notes, and snippets.

@xuhao10101
xuhao10101 / JsonFormatter.cs
Created June 26, 2022 13:53 — forked from jfranmora/JsonFormatter.cs
JSON Pretty print, useful for editor stuff without having to deserialize/serialize it again
using System.Text;
public static class JsonFormatter
{
private const string Indent = " ";
public static string PrettyPrint(string input)
{
var output = new StringBuilder(input.Length * 2);
char? quote = null;
@xuhao10101
xuhao10101 / StringTagExt.cs
Created June 26, 2022 13:52 — forked from jfranmora/StringTagExt.cs
Extension class to use rich text in Unity Console. https://docs.unity3d.com/Manual/StyledText.html
public static class StringTagExt
{
public static string AddBoldTag(this string text)
{
return text.AddTag("b");
}
public static string AddItalicTag(this string text)
{
return text.AddTag("i");