This is how Unicron revives and upgrades Megatron goes in Transformers Prime: Friendship is Magic: Beast Hunters: Predacons Rising.
Unicron: Megatron. Megatron! Megatron!
[Transformers Prime Beast Hunters theme song plays]
Megatron: I do not understand. Why am I not one with the Allspark? Do I yet live?
Unicron: You do not, yet you cannot join the Allspark because my life blood once flowed through your veins.
Megatron: Dark Energon.
Unicron: It binds you to my Anti-spark.
Megatron: Optimus Prime used the Matrix of Leadership and Twilight used the Magic of the Alicorn to imprison you within Equestria's core. So how is it that you speak to me now?
Unicron: The foolish Prime and Princess rendered only my material form dormant. But my energy form was roused from slumber when I sensed the awakening of an ancient rival across the cosmos.
Megatron: Primus. So, it would seem that Optimus succeeded in restoring Cybertron after my demise.
Unicron: I now wish to finish what I began eons ago, and for that, my Anti-spark requires a vessel.
Megatron: So I will live again?
Unicron: Only to serve me. Your husk will simply be an instrument of my will.
[Unicron uses his power to upgrade Megatron and they fly out of the ocean.]
Megatron: Super-luminous space drive. Impressive.
Unicron: One of many upgrades that I've made to your limited corporeal form and wholly necessary to reach Cybertron.
Megatron: So... we are to rule together, as one?
[Unicron zaps Megatron which makes him scream in pain]
Unicron: You will rule nothing! I travel to Cybertron for one reason only-to destroy Primus personally.
Megatron: But... to destroy Primus... is to destroy Cybertron!
Unicron: Thus will begin a new age-the age of chaos!