Skip to content

Instantly share code, notes, and snippets.

@inertiave
Created January 10, 2020 01:23
Show Gist options
  • Save inertiave/805ce038e425c469649d2c428be5abbb to your computer and use it in GitHub Desktop.
Save inertiave/805ce038e425c469649d2c428be5abbb to your computer and use it in GitHub Desktop.
using UnityEngine;
using RichText;
public class RichTextDemo : MonoBehaviour
{
private const float Pi = 3.14f;
private const string Quote = "\"Hank, this is great.\"";
private void Start()
{
// Without RichText
Debug.Log($"<color=purple><size=17><b><i>{Quote}</i></b></size></color> \nPi: <color=blue><i>{Pi}</i></color>");
// Using RichText
Debug.Log($"{Quote.Size(17).Bold().Italic().Purple()} \nPi: {Pi.Blue().Italic()}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment