Highlighting an object in the heirarchy

I’m trying to adjust a custom editor to allow users to press a button, and the object will be highlighted in the heirarchy (but not selected), the same way that Debug.Log(string, object) does, but without having to fill the console with text. Does anyone know of a manual way to do this?

Sure, you want this function:

EditorGUIUtility.PingObject

You use EditorGUIUtility.PingObject to achieve that.