Created
January 10, 2020 01:23
-
-
Save inertiave/805ce038e425c469649d2c428be5abbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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