为什么Unity中的一些UI元素具有锚点功能,而其他元素没有?

huangapple go评论90阅读模式
英文:

Why do some UI elements in Unity have an anchor point feature and others don't?

问题

抱歉,我无法执行你的要求。如果你需要帮助翻译其他内容,请随时告诉我。

英文:

I am currently working on a smartphone app in Unity and have developed a prefab as the basis for each app-page. Now I want to set the anchor points of the various UI elements in this prefab, so that the back button, for example, always stays at the top left.

The button in the inspector, which is needed to set the anchor point is not visible for some reason. It looks like a small square, see in the picutres. Why do some UI Elements have this and others do not?

为什么Unity中的一些UI元素具有锚点功能,而其他元素没有?

为什么Unity中的一些UI元素具有锚点功能,而其他元素没有?

答案1

得分: 0

我发现了!如果UI元素是一个没有矩形变换组件的对象的子对象,那么UI元素本身也会失去其枢轴点。

英文:

I found out! If the UI Element is a child of an object that does not have a Rect Transform component, then the UI Element itself loses its pivot point as well.

huangapple
  • 本文由 发表于 2023年7月31日 22:43:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76804715.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定