【Unity】RectTransformUtilityを活用する
RectTransformUtilityとは? Unityにおいて、Canvas以下にあるGameObjectはTransformの代わりに
UI要素の位置やサイズ調整を行う際に使用する、RectTransformコンポーネントを持っています。
RectTransformUtilityはRectTransformに関する便利な機能を提供するクラスです。
RectTransformUtility - Unity スクリプトリファレンス RectTransform と動作するヘルパーメソッドを含むユーティリティクラス。 docs.unity3d.com