I define some functions to be called in case of hovering/clicking in the constructor of an AActor derived class.
This has been working for a long time (4.5 ou 4.6), until i tried to change one of the delegate functions in the current 4.7.
Here, the commented lines are the original one, and the uncommented are the test ones.
//OnBeginCursorOver.AddDynamic(this, &AYagActor::HighlightOn); //OnEndCursorOver.AddDynamic(this, &AYagActor::HighlightOff); //OnClicked.AddDynamic(this, &AYagActor::AskForPossessionOnlyIfNotPined); OnBeginCursorOver.AddDynamic(this, &AYagActor::AskForPossessionOnlyIfNotPined); OnEndCursorOver.AddDynamic(this, &AYagActor::AskForPossessionOnlyIfNotPined); OnClicked.AddDynamic(this, &AYagActor::AskForPossessionOnlyIfNotPined);
The test ones are never taken into account, even if i suppress all the lines, the old functions are still called in game, despite not being called in the code any longer !
AskForPossessionOnlyIfNotPined() begins with a GEngine->AddOnScreenDebugMessage message that is never displayed. Even with the exact above code, the HighlightOn and highlightOff functions are still called when hovering the actor with the mouse cursor.
I can change some other parameters in the constructor and they are taken into account, but not those 3 lines.
The function are called nowhere else in the code.
I have stopped the editor, cleaned the solution, rebuild it entirely, but it makes no difference.
I am not able to change nor suppress the delegates defined in the constructor.
Maybe there is a huge error in my code right under my nose, but i can’t see it. Any idea where i could look ?