Editor "onFocus" event C++

Hello there. =)

I want to draw some debugs line in editor for actor that in focus. For example like “UPawnSensingComponent” do.
Is there some specific event? Unfortunately I can’t find anything about it.

There seems to selection delegates in USelection delegate (look on constance section)

They are static so you don’t need instance of USelection. Look in on source code, you bind new functions to it like this

USelection::SelectObjectEvent.AddRaw(this, &FSomeClass::SomeFunction);

For arguments needed in your function click on delegate type in API refrence (starts with F) and you can see element type in template. For example SelectObjectEvent require your function to have UObject pointer, that pointer will be your selected actor.

remeber to filter any editor only code using WITH_EDITOR macro or else you might have problem to build Shipping build of your game

#if WITH_EDITOR

//here editor only code

#endif

Thank you very much =)
It’s help me.