Hello guys !
Am making this post cause am having trouble understanding the right way to use delegates inside the engine (beginner here).
I created inside an actor a delegate which is called FGameStateSigleTODChanged and inside the same header file (but not the same class) this code:
In the actor header
to declare a method using the delegate
I use a broadcast inside the cpp file of the actor also
in the actor cpp file
Well so far so good. If I place an actor inside the level and that I bind my method to a custom event in BP, It works as expected.
The problem comes if I try to make it work in cpp using the same logic.
I try to get all the actor of my actor’s class. I cast my class to the resulting actor but can’t seem to be able to bind it (it’s not a proposed method)
code inside the other class cpp:
I hope I am clear enough and I am sure it’s just a rookie mistake.
Thanks a lot for taking the time to read me !