summaryrefslogtreecommitdiff
path: root/scene/main/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/timer.cpp')
-rw-r--r--scene/main/timer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 25d1c8530e..8e80f868c6 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -36,8 +36,12 @@ void Timer::_notification(int p_what) {
case NOTIFICATION_READY: {
- if (autostart)
- start();
+ if (autostart) {
+#ifdef TOOLS_ENABLED
+ if (get_scene()->is_editor_hint() && get_scene()->get_edited_scene_root() && (get_scene()->get_edited_scene_root()==this || get_scene()->get_edited_scene_root()->is_a_parent_of(this)))
+ break;
+#endif start();
+ }
} break;
case NOTIFICATION_PROCESS: {