Consider a scenario,
I created a new C++ class inherited from UUserWidget (Let us call it A)
Then I created a new widget BP.(Let us call it B)
Then I made A (By going to class settings), the parent of B. (so B is a child of A)
After that I started working on B(widget BP)
i) Added a UImage and named it “TestImage”
Inside the class A, I tried to get TestImage
UImage* Image = (UImage*)GetWidgetFromName(“TestImage”);
Here I am able to get reference of the Image in B from A. And I can manipulate it in any way I want.
How is this possible?
How can I access a widget in child(B) from parent(A)?
It seems like the exact opposite of inheritance.