Refactoring my dialogue system.
I have three BPs that are relevant to this problem:
-
The dialogue box itself, which is a widget.
-
The dialogue topic widgets, which are created dynamically when the dialogue box is made visible.
-
A dialogue manager actor.
There are some topics that all NPCs will have available to them, so they get created from the dialogue box’s BP.
The dialogue box calls an event dispatcher. The dialogue manager has a custom event bound to this event dispatcher. When that happens, it generates the rest of the topics.
The topics generated from within the dialogue box BP come through with their buttons working. The topics generated form within the dialogue manager do not.
Here is how they are spawned in the dialogue box BP:
Here is how they are spawned from the dialogue manager: