【发布时间】:2020-02-14 18:33:55
【问题描述】:
我正在尝试使具有默认锚设置的 RectTransform 遵循右下对齐非拉伸的 RectTransform。但是,它们之间总是存在偏移量。
我尝试过 GetWorldRect().center 并将其转换为 WorldPoint,但没有成功。使用变换。 position 仅在两个 UIElement 都使用默认值锚定时才有效。
任何人都可以帮助填写以下方法主体吗?
public static void FollowRectTransform(this RectTransform source, RectTransform target)
{
}
【问题讨论】:
标签: c# unity3d game-engine