- Home /
Are there any delegate which fires only when a scene has changed in Editor mode, without using ExecuteInEditMode attribute?
My problem with the ExecuteInEditMode is that it needs to be on a MonoBehaviour, and that needs to be on a GameObject. Is there a way to run an editor script function only when something changed in the actual scene? EditorApplication.update runs too much times, which can be expensive, and OnGUI, OnSceneGUI are methods for custom inspectors, but I don't want this to be a custom inspector.
EDIT: IS there a way to call a method, when the Game view (active camera) needed to redraw itself in editor?
Supposing you have a custom window:
https://docs.unity3d.com/ScriptReference/EditorWindow.OnHierarchyChange.html
Check this thread:
https://forum.unity.com/threads/get-dirty-flag-from-current-open-scene.271908/
Nope, not editor window. I just want a feature which run everytime the scene has been modified, but it should not be placed onto any object.