/// If we have a debug view, show the list of all variables in it
    internal void Update()
    {
        if (debugTextView != null)
        {
            var stringBuilder = new System.Text.StringBuilder();
            foreach (KeyValuePair <string, Yarn.Value> item in variables)
            {
                //Debug.Log("Updating Value for " + item.Key);

                string debugDescription;
                switch (item.Value.type)
                {
                case Yarn.Value.Type.Bool:
                    debugDescription = item.Value.AsBool.ToString();
                    break;

                case Yarn.Value.Type.Null:
                    debugDescription = "null";
                    break;

                case Yarn.Value.Type.Number:
                    debugDescription = item.Value.AsNumber.ToString();
                    break;

                case Yarn.Value.Type.String:
                    debugDescription = $@"""{item.Value.AsString}""";
                    break;

                default:
                    debugDescription = "<unknown>";
                    break;
                }
                stringBuilder.AppendLine(string.Format("{0} = {1}",
                                                       item.Key,
                                                       debugDescription));
            }
            debugTextView.text = stringBuilder.ToString();
            debugTextView.SetAllDirty();
        }
    }