Transylvania was a part of Hungary once.
This was before the First World War, and some of the more famous Emperors and Kings that ruled Hungary also ruled the Dual Monarchy, Austria.
Emperor Franz Joesph of Austria and King of Hungary, was a man who had fate as an enemy, perhaps most famous for being the man who started the First World War, his family life was not good: His son commuted suicide and his wife was assassinated, his eldest daughter died young, and only two daughters survived him. What created the start of the war was another death that of the heir to the throne
Emperor Karl of Austria and King of Hungary was the last of the Hapsburg to rule the area. He died in 1922, after becoming Emperor in 1916 after the death of Franz Joesph. He was bets know to be the Emperor that King George V of England did save-- as he did not save the Romanov Imperial family.
Transylvania after negotiations went to Romania , with much help from Queen Maria of Romania, who was George's first cousin.