0
1

More than 3 years have passed since last update.

スクリプトからTextAlignment(テキスト位置)を変える

Posted at

TextAlignment(上下、左右、真ん中)をスクリプトから変える方法です。
英語の記事しか無かったので書きました。


//左上
text.alignment = TextAnchor.UpperLeft;
//上
text.alignment = TextAncor.UpperCenter;
//右上
text.alignment = TextAncor.UpperRight;
//左
text.alignment = TextAncor.MiddleLeft;
//真ん中
text.alignment = TextAncor.MiddleCenter;
//右
text.alignment = TextAncor.MiddleRight;
//左下
text.alignment = TextAncor.LowerLeft;
//下
text.alignment = TextAncor.LowerCenter;
//右下
text.alignment = TextAncor.LowerRight;

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1