UE4 display actor name from mouse cursor

Hi.
While I tried to learn something about the “draws text” node usage, I found a way to display the name of all actors placed in my level simply by using mouse cursor over it, with “get display name” node placed into the text pin of “Draw text” node.
Then something went wrong and I deleted the blueprint class with that function.
Now I am trying to make that function again but I don’t remember all blueprint nodes to use.
If somebody had tried to make something like this, could explain me how to get the function works again?