2021-01-18から1日間の記事一覧

Unityで画面に描画せずにテキストの幅と高さを取る方法

var fontAsset = AssetDatabase.LoadAssetAtPath<Font>(fontPath); var settings = new TextGenerationSettings { generationExtents = Vector2.zero, textAnchor = TextAnchor.MiddleCenter, alignByGeometry = false, scaleFactor = 1.0f, color = Color.white, </font>…