As a related question, were there any attempts between the fall of Rome and the 1800s to unify the country?
The assumption that Italy was going to be unified, sooner or later, and that for the resisting forces it was in substance a matter of delaying the inevitable - that's a common theme of the Risorgimento narrative developed in the following decades, and to some extent it might even be an accurate one. At the same time, it's not necessarily the most convenient framework to anser your question.
While many supporters of the Italian unification, through the first half of the XIX Century - when the national program was still growing from a literary fascination into a true political platform - would agree with this view (most notably of course Giuseppe Mazzini), this was far from a universally accepted fact even during the actual unification.
We may even claim that the idea of forming Italy, "United, Free, Independent" - to cite from Mazzini's letter written to the new King of Piedmont in 1831 - was at the time a minoritarian one; and that many portions of the Italian establishment looked rather for a gradual process of development of economical and commercial ties between the Italian regions, which may have led, some day, to a proper unification, in two Kingdoms perhaps, one in the north and one in the south. It was a talks of trade federations, tariffs, tolls, commerce and railways which anticipated and helped characterize in more practical terms the aspirations of men like Mazzini, who conceived the national spirit as the one necessary and sufficient precondition for the actual nation.
Even in the 1830s though, there were those who rejected the idea of Italy even as a literary concept - let alone a political one - see for instance a review of the recently published (1833) Ettore Fieramosca - Massimo D'Azeglio's novel on the episode of the Challenge of Barletta - which appeared in the reactionary periodical L'amico della gioventù:
It doesn't take much looking around, I think, for any honest man to form an opinion as to why it doesn't make sense to take for the subject of an Italian historical novel events and circumstances lifted from the particular history of peoples who aren't Italian.
Of course, the rejection itself, and the notable success of D'Azeglio's novel - as well as many others of "national" inspiration published during the 1830s and 1840s - prove that there was a point in the romantic obstinacy to "fabricate" examples of national sentiment and to find inspiration where there was, to be fair, no nation of old.
And that's one of the reason why many of the Italian contemporaries - while they regarded their identity as something that may be real, were less secure in their assumption that their Italy could result into a viable political creature. After all, Italy had been divided for centuries; and not only due to her internal frictions and particularism, but also thanks to the decisive action of the major European powers in that direction. Spain, Austria and France - besides holding large portions of Italy for themselves since around the XVI Century - had opposed the absolute hegemony of any other power over the Peninsula, so that the Italian unification would have been problematic even as subjects of a foreign power. Even before, the Italian system had been affected by the relations and conflicts between two even greater concepts - the Empire and the Church.
And the Church - according to a line of thought originating with Machiavelli and developed in a more subtle manner by De Sanctis and Gramsci - had been one of the stronger obstacles to the Italian unification. Outside of the practical presence of the Papal States - which had either to be removed somehow, or to accomplish the unification themselves - the Church carried with itself a character of universality which subsumed the Italian call to greatness into a greater and more noble spiritual mission.
Paraphrasing the words of De Sanctis: the Italians were told that as political beings they were weak, miserable and oppressed - as Catholics though, they stood at the center of universal Christendom. Your choice!
It was only when some more material forces prompted the spread of the idea of some unification that the Italians could abandon this universality and embrace nationality. That's at least one way to put it.
One should realize that divisions aren't broken merely by ideas - the Italian unification worked (in a time when political debate was a non-thing due to the pressure of censorship, and anyways political thought would appear far removed to the one we are more familiar with) through some mysterious ways, such as the developing debate over the matter of internal trade circulation (while we have no perfectly accurate estimates, it's generally accepted that the Italian States during the first half of 1800 were still trading more with foreign nations than among each other - Piedmont with France, Lombard with Austria - Naples with Sicily and both with GB and France), of land clearings (the numerous works required not only progress in technology but also some degree of coordination between States), of commerce and railroads. Which offered not only a chance of recurrent contacts between the intellectual establishment (the "Meetings of the Italian Scientists" for instance held during 1840s), but also established a habit for exiles of one State to work in the administration of another.
Like some have perhaps overestimated the role of the Church in preventing the Italian unification, others have proven too confident in the impact of internal communications to bring it forward - the Count of Cavour for instance, in his Des chemins de fer en Italie of 1846, seemed to believe that the development of a railroad network was not only going to favor the formation of a national identity together with a political unity, but to ensure the peaceful progress of the European nations in the future.
But in fairness, the removal of certain barriers and restrictions on circulation of goods, of ideas, of people - as well as, more prosaically, on the ability of the State to collect revenue - was a central part in the development of the material conditions and forces behind the Italian unification.
In this sense, it's true that certain regalistic policies had been introduced within the Italian States before 1789, but a complete and systematic administrative reform - with a final "eversion of feudality", outside of the more instrumental policies such as those enacted by the Ministers Tanucci and Bogino in Naples and Piedmont respectively - came to be conceived only after the French Revolution and under the influence of the Napoleonic administration (the fact that Napoleon, among his other creations, had formed a short lived "Kingdom of Italy" did something as well...). Even men who were far from invested in the Italian unification, such as the Papal Secretary of State Ercole Consalvi, observed in 1816 that the Napoleonic reforms had worked, at least in part, a "providential function" and had helped remove certain obstacles to an administrative improvement that the Papal Government might have been unable to dismantle by itself.