How can I Include string variables in Rich Text?

I’m finishing up my game and I’m trying to set up the death screen that displays high scores. I think it would be easiest to use Rich Text on my GuiText.

Is there any way I can add a string variable to my Rich Text?


This is a very contrived example of how to use a variable with GUIText and Rich Text. Essentially, there is nothing really different. You just need to include the tags.

using UnityEngine;
using System.Collections;

public class RichTextDemo : MonoBehaviour
	const string EXAMPLE_TEXT_BASE = "This is a <b>{0}</b> of using variables with <i>{1}</i>.";
	const string EXAMPLE_TEXT_BASIC = "basic";
	const string EXAMPLE_TEXT_RICH = "Rich Text";

	void Awake()
		GUIText text = GetComponent<GUIText>();
		text.text = joined;