How to get widget from Panel Slot?

How to get widget from Panel Slot?

You can *Get Child At *if you know the index. Otherwise, you need to be more specific regarding what you’re trying to do.

How to Connect

It won’t work like that. A slot is already a child, kind of. Just use a Canvas Panel -> Get Child.

The above widget has a *Canvas Panel *which, in turn, has some other widgets nesting in there. You can Get Child At from the *Canvas Panel *(or any panel widget) and then treat this child as a slot - this gives you access to anchors, padding and all the slot goodies.

How to Connect ,get widget from Panel Slot

This will not work, I explained above. I do not understand what you’re trying to do but here is what I think you’re trying to do:

If this does not help - consider using Google Translate if you do not feel confident enough writing in English. Or try asking your question here: 简体中文 (Simplified Chinese) - Unreal Engine Forums. I see some activity on the Answer Hub in your language, too. Last resort - try that

get the Target Image , warning , why?

Need Panel slot type, no change

This cast will always fail, your custom Target Image widget does not inherit from Panel Slot.

Need Target Image widget from Panel Slot ,how to set

As far as I know slots do not care what is inside of them. They simply contain layout information of a panel. You can’t access widgets from an UMG slot.

Я не хочу создавать лишние переменные и поэтому делаю UserWidget наследованием. А чтобы сделать наследованием без лишних элементов требуется функция добавления в корень UserWidget.

PreConstruct: Код генерации интерфейса и добавление это в корень UserWidget.
Переменные родителя

PreConstruct Берем из корня UserWidget интерфейс и вставляем в генерируемый интерфейс.
Переменные родителя
Переменные наследника