Skip to content

Instantly share code, notes, and snippets.

@lycoris102
Last active November 6, 2017 14:32
Show Gist options
  • Save lycoris102/b30189398e45cd954c4ecd11323ba79c to your computer and use it in GitHub Desktop.
Save lycoris102/b30189398e45cd954c4ecd11323ba79c to your computer and use it in GitHub Desktop.
using System;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
// see also : http://dotween.demigiant.com/documentation.php
public class DOTextSample : MonoBehaviour
{
public Text Text;
void Start()
{
string[] textArray =
{
"<color=#008080>こ</color>",
"<color=#778899>う</color>",
"<color=#f5f5f5>で</color>",
"<color=#008080>し</color>",
"<color=#778899>ょ</color>",
"<color=#f5f5f5>う</color>",
"<color=#008080>か</color>",
"<color=#778899>!</color>",
"<color=#f5f5f5>?</color>"
};
this.Text.DOText(String.Join("", textArray), 1.0f)
.SetEase(Ease.Linear)
.Play();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment