Running/trigger function when the editor stopped playing a scene with plugin

Godot Version



Im making a plugin that generates compiled resources on _build(). I want to clean/delete these compiled resources when the editor stopped playing a scene.

I know theres EditorInterface.is_playing_scene() but Im still confused on how to implement it. And also I’d prefer something like signal or virtual method.

So Im wondering if theres something like the opposite of EditorPlugin’s _build()