LoginSignup
3
1

More than 5 years have passed since last update.

RectTransformを動かす

Last updated at Posted at 2017-07-27

RectTransformのTransformは読み取り専用
(アンカーを基準点として位置を決めているから)

RectTransformの持つ変数
anchoredPosition:アンカー基準点に対する RectTransform の相対的なピボットの位置
を動かせばよい。

test.cs

Vector2 v1 = new Vector2 (-50.3f, -5.45f);
GetComponent<RectTransform>().anchoredPosition = v1;
3
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
3
1