
本文共 3026 字,大约阅读时间需要 10 分钟。
���������Unity UI���������������������RectTransform
���������������������RectTransform���������������Unity UI���������������������������������������������������������������RectTransform���������������������������������������������������������������������������������������������offsetMin���offsetMax������������������������������������������RectTransform������������������������
���������������������
���������������������������UI������������������������������RectTransform���������������������������������������������������������left���right���top���bottom��������������� UI���������������������������������������������������������������RectTransform������������������offset���������������������������������������������������������offsetMin ��� offsetMax ���������
offsetMin���offsetMax������������RectTransform������������������������������������������������������������������������- offsetMin������������RectTransform���������������������������������������left���bottom���
- offsetMax���������������������������������������������right���top������������������������������Anchors������������������1���1���������������������������������������������������������������
������������������ RectTransform ������
������������������������������������������RectTransform���������������������������������������������������1. ������ RectTransform ��� top ��� right
��������������������������������� UI ���������������������������������������������GetComponent().offsetMax = new Vector2(left, top);
���������left���top������������RectTransform���������������������������������������������������������������������������������������������
2. ������ RectTransform ��� bottom ��� left
���������������������������������������������������������������������������GetComponent().offsetMin = new Vector2(right, bottom);
���������������������������������������������������������������������������������������
3. ������ RectTransform ������������������
��������������� RectTransform ���������������������������������������������������������GetComponent().sizeDelta = new Vector2(width, height);
���������width���height������������RectTransform������������������������������������������������������������������RectTransform���������������������
4. ������ RectTransform ���������
������������������������RectTransform���������������������������������������������GetComponent().anchoredPosition3D = new Vector3(posx, posy, posz);GetComponent ().anchoredPosition = new Vector2(posx, posy);
���������������������������������RectTransform���������������������������������������anchoredPosition3D������������x���y������������������z���������������������������3D������������������������anchoredPosition������������2D���������������������
������
������������������������������������������������������������������RectTransform���������������������������������������������������������������������������������������������RectTransform������������������������������������������������������UI���������发表评论
最新留言
关于作者
