Germany was united through the careful and cold strategies of Otto Von Bismarck. He engineered a series of wars against Denmark, Austria and then France that sparked conscioussness and nationalism amongst the German peoples. He dominated German and European diplomatic affairs for decades. Internally, he tried to keep balance between the different political and cultural factions within Germany; choosing carefully whom to ally, and against whom.
Yugoslavia was always surrounded by both internal and external conflict. It was divided religiously with catholic croatians, muslim bosnians and orthodox serbians. Initially, it had conflicts against both Italy and Bulgaria. The fascists and the communists fought each other for the most part of its earliest history. The Ustase were very active until the end of WW2. Tito was arguably the one man who could keep it together, as his economic and diplomatic policies were very successful, and were popular with the many nations of Yugoslavia; however, just like with Bismarck, things started falling apart after he stepped out. In the end, a "Yugoslavian nation" could not be achived. With the end of the USSR, Yugoslavia eperienced a similar breakup.
However, Yugoslavia wasn't the only country which couldn't achieve to become a nation-state. Belgium, Canada and the UK come to mind as multi-national countries. They achieved cultural stability through reforms, rights to autonomy, and political stability. The Yugoslavia of 1990 had neither.