The problem is that I have designed a command that must execute a function related to the UI, for that, the command uses the World, which is its Outer, and reaches the UI manager, and finally, executes a function of that manager. . The problem is that that feature is implemented in Blueprint, and there seems to be a security cordon around Blueprint, not allowing anything external to run anything internal.
First I have tried it directly executing “Broadcast”, from the button that has the behavior that I wanted it to execute. And something strange happened, and that is that the entire execution flow was correct, up to the Broadcast, which seemed not to reach the Blueprint Event that develops the behavior. But if I press the button, it does arrive.
Then I have tried adding a parallel function, and connecting it with that behavior. But neither with BlueprintImplementableEvent, nor with BlueprintNativeEvent I have been able to achieve it. In the second case, the Native version is always executed directly. And in the first one it only runs if I call it from inside that class, but not from outside.
I’m going crazy.
I need to execute the behavior bound to this event from an external object. And I can’t do it directly or roundly.
Hi,
Not sure if I understand what you are trying to do, but If you are just trying to call OnClicked event externally, dont bother. Just make a function or an event that does things you want when the click happens, connect it to OnClicked event, and then call this function / event directly from other BPs freely, without bothering about OnClicked event.
Hello, the commands are UObjects, which inherit from the IActionButton interface, which only forces the Execute() function to be implemented.
In a specific subtype of command, through the UWorld that I get by creating the command with NewObject, when I Execute() I get FirstPlayerController, with it I get AHUD, and with this I get my GameUI object, which is a Widget. I ask this GameUI Widget for AddNextDialog, or try to execute its DownScrollIndicator button, as if it had been clicked, with Broadcast. But it’s this last communication attempt, that is, trying to run something from GameUI from my command, which doesn’t work.
I think the problem is that I can’t call functions from the Widget. I have been testing with other types of objects and if I can call their public functions without problems. Is this the problem?