1: I’ve created component (UsableComponent) inherited from BoxComponent and added “OnUsed” Dynamic Multicast Delegate. Code of .h:
Code of .cpp where delegate is broadcasted:
2: I’ve created Actor which have this component as subobject and defined hook for this ‘OnUsed’ in constructor.
Also for testing ‘OnComponentBeginOverlap’ is hooked too.
3: Created BP version of Actor from step 2 (Door), and in eventgraph next:
4: Testing in-game results:
As you can see my custom delegate ‘OnUsed’ is fired in BP, but in CPP not. Also interesting moment that OnComponentBeginOverlap works well. So where is my mistake? Thanks.