I am referencing inventory from its child object, what do you think about this solution?
Not sure if its illegal or absolutely flawless solution.
Share you opinions please

I am referencing inventory from its child object, what do you think about this solution?
Not sure if its illegal or absolutely flawless solution.
disgusting
Out of sheer curiosity, who needs to talk to whom? Where are those actors? Inventories are generally aware of their own children whereabouts, so a child would talk to the inventory through an Event Dispatcher.
Actually to lazy to write it down so there is it drawn
It does sound like a clear cut job an Event Dispatcher. The tile view spits out a widget ref every time an entry is generated, bind what’s need to the inventory’s custom event / function on the fly. Clean script, no more references and if something becomes invalid, no one will complain because Dispatchers couldn’t care less. And since tile view automagically maintains widget lifecycle, there’s no need to unbind.
Good luck one way or another!
But even for the dispatcher, I need the reference to the inventory where the dispatcher is declared, or am I completely wrong?
there should be some common object you can get this information from, say for instance in your case if your inventory is a widget save a referance to it in the hud and then anything can access it by GetHUD->GetMyInventory
or if the inventory is one an Actor find a way to get that Actor and get its inventory component.
If its single player you could basically store references anywhere, GameMode, GameInstance etc for easy access