Quick answer: Unity AssetPostprocessor calling AssetDatabase methods during OnPostprocessAllAssets causing editor deadlock? Postprocessors must defer cross-asset operations - schedule via EditorApplication.delayCall.
Postprocessor that imports auxiliary files crashes the editor mid-import.
Defer the operation
EditorApplication.delayCall += () => {
AssetDatabase.ImportAsset(path);
};Runs after the import pipeline completes. No deadlock.
Or use deferred queue
Postprocessor appends to a static List; an EditorWindow processes the list on update. More structured.
Avoid reentrant imports
Postprocessor must not trigger imports that re-trigger itself. Audit for cycles.
“Asset Database is reentrant-hostile. Postprocessors need to know.”
Document the postprocessor pattern in your tools wiki. New contributors will write recursive imports otherwise.