最近在编写可自动适配的内容适配器,这是为了满足我自定义的布局需求。所以当锚点改变时,我需要获取RectTransform.sizeDelta值,不过我对这个属性一知半解,也查过Unity的文档了。
The size of this RectTransform relative to the distances between the anchors. If the anchors are together, sizeDelta is the same as size. If the anchors are in each of the four corners of the parent, the sizeDelta is how much bigger or smaller the rectangle is compared to its parent.
看了半天还是不知所云,有人能帮忙解释下么?