UE4C++ 设置UMG控件的Slot

转:https://blog.csdn.net/l171672538/article/details/78874601

本篇介绍一下 如何使用代码来获得或者设置控件的位置锚点等。。。

首先看一下次控件所属插槽是什么类型的

如果当前所要操作的控件是Image1 而它的插槽是CanvasPanelSlot

那么C++中格式为:

如果所要操作的控件CanvasPanel1的Slot为HorizontalBoxSlot

C++中:

另贴上一些底层代码 来了解一下插槽的 Offset、Position、Size

Position.X = Left;   Y = Top;

Size.X = Right;  Y = Bottom;

OffSet

猜你喜欢

转载自blog.csdn.net/Samkes2/article/details/81479934