Reuse UUserWidget Have ScrollGridBox

我有一个继承自UUserWidget的类,这个类里面包含ScrollGridBox,我想把这个类在CreateWidget之后进行复用但是只有第一次AddChild的时候执行ScrollGridBox的RefreshAllItem里面的Widget会正确创建,当我把这个Widget通过AddChild放入另外一个Slot的时候ScrollGridBox的RefeshAllItem就失效了,请问如何解决这个问题?
I have a class that inherits from UUserWidget. This class contains ScrollGridBox. I want to reuse this class after CreateWidget, but only when AddChild is executed for the first time, the Widget in ScrollGridBox’s RefreshAllItem will be created correctly. When I add this Widget When adding another Slot through AddChild, RefeshAllItem of ScrollGridBox becomes invalid. How to solve this problem?

1 Like