diff --git a/src/lua_script/lua_script_system.cpp b/src/lua_script/lua_script_system.cpp index 5f282167dc..81f0b19e57 100644 --- a/src/lua_script/lua_script_system.cpp +++ b/src/lua_script/lua_script_system.cpp @@ -2203,6 +2203,9 @@ struct LuaScriptModuleImpl final : LuaScriptModule auto iter = m_inline_scripts.insert(entity, InlineScriptComponent(entity, *this, m_system.m_allocator)); serializer.read(iter.value().m_source); m_world.onComponentCreated(entity, LUA_SCRIPT_INLINE_TYPE, this); + if (m_is_game_running) { + startScript(entity, iter.value(), false); + } } }