Get notified in edit time when Objects are deleted/added to scene

Hello. I am making a genreric cache to store there all current Scene’s objects grouped by there type. So i want to know when objects are added/deleted from scene. P.s i work in edit time only. Is there such an event ready to use?

Have you tried to use Undo.postprocessModifications and Undo.willFlushUndoRecord events?

Found solution. EditorApplication.hierarchyChanged event triggers every time hierarchy changes. Includes add/delete. Note that the event is not raised immediately in response to these actions, but rather during the next update of the editor application. So we a are sure that all actions have already been executed.