Custom Editor Buttons

Hello guys,
how can i create a custom button when i right click to an object? For example i want to right click to an actor inside of the viewport and copy the transform. how can I do? I cant find anything… I found about the EditorUtilltyBlueprint but I cant find anything…

Add in the UFUNCTION() the CallInEditor, this will enable you to add buttons to the category of the function.For eg, if we have UFUNCTION(CallInEditor, Category=“Test”), in the Category named Test a button will appear.