TextMesh Proとは?
テキストのための究極のソリューションです!ということでこちらを使うようです
https://docs.unity3d.com/ja/2019.4/Manual/com.unity.textmeshpro.html
Text Mesh Proだと 今まで入れてたフォントが使えなくなりました。
で、変換が必要なようです。

したの Legacy の中に Textがありますが、とりあえず TextMeshProが標準ということだと思うので
というか Button / Dropdown / Input Field も TextMeshProですね
詳しくはわかりませんが、テキスト?表示が良い感じになるそうな?
フォントを変換してみます。今のところアルファベットだけ使えれば良いので。

Font Asset Creatorを利用するそうです。

Source Font Fileでフォントを選択

2文字失敗したようです。とりあえず、このままSaveで保存。
SDF という名前が付いています。

テキストの方で先程生成したフォントを選択できました!
スクリプトからの更新は
TMProを追加
using TMPro;
テキストのオブジェクトから TextMeshProUGUI を取得して textを操作
textGameObject.GetComponent<TextMeshProUGUI>().text = "new Text";
標準なのに UnityEngine.UI に入っていない?
そのうち変わるかな?
コメント