This is how Megatron disbands the Decepticons and Sunset volunteers to teach Megatron about friendship goes in Thomas' Adventures of Transformers Prime Beast Hunters: Predacons Rising.
Optimus Prime: As a being comprised of pure energy, Unicron's Antispark was vulnerable to this reliquary of the Primes.
Smokescreen: But if he's in there, where's-
Starscream: Praise the Allspark! Master! You're alive!
Starscream: Your new battle armor will take things to the next level, My liege. Together we will reunite all Decepticons and once again grind Cybertron under your mighty heel!
Starscream: What? Why?
Megatron: [looks at Ryan, Optimus and Twilight] Because I now know the true meaning of oppression and have thus lost my taste for inflicting it.
[everyone is surprised to hear Megatron say that]
Starscream: Uh, you've clearly been traumatized, master. A good power-down and a stroll around the smelting pit will put you back in touch with your inner warlord.
Megatron: Enough! The Decepticons are no more, and that is final.
Ryan F-Freeman: Wait! Don't go!
[Megatron turns to him]
Megatron: Why not?
Sunset Shimmer: [steps forward] Because I can teach you about friendship. [holds out her hand to him] Take my hand, Megatron. Let me show you that there is another way. Like someone once did for me.
Megatron: I don't know.
Sunset Shimmer: But if you accept my friendship, you'll be friends and brothers with Optimus again. Please, Megatron.
Megatron: [looks reluctant at first but then looks at Ryan]
Ryan F-Freeman: Look. I know you got hard because of Unicron. Maybe you can see Optimus again in a new body.
Megatron: [sighs] For once, Ryan. You are right. [looks at Sunset and extends his hand] I will accept...
Ryvine Sparkle: NO!! [grabs Megatron] He's not going to accept your friendship, Sunset Shimmer. When Makuta comes for you. Your past.. will be TODAY!! Megatron is my friend, not yours!
Megatron: [throws Ryvine to the ground] You do not know the true meaning of oppression! You need to realize that this organic understands me unlike anyone else! [aims his blaster at him] So, if you want to live, retreat. Because if you keep trying to destroy my new friends, I will have to do whatever it takes to protect them!
Ryvine Sparkle: Alright. You've won this time. But next time, me, my sister and the villains will be back and we will deform you and Sunset and bring her to Makuta's side! [opens a rift and walks into it]
[After the rift closes, Megatron turns to Sunset]
Megatron: So, you realized eons ago what you were doing was wrong.
Evil Ryan: Wait. What about Cody?
Megatron: Oh. [clears throat] So, you and Cody realized eons ago what you were doing was wrong.
Ryan F-Freeman: I got an idea. I would make you Sunset's bodyguard, if I escort you to Earth.
Megatron: Actually, Ryan, I prefer to stay on Cybertron. Because, here, Sunset can teach me everything she knows about friendship.
Evil Anna: But, no. We would do the same for you. You should thank Ryan for getting Unicron out of you.
Megatron: Thank you, Ryan. [to Evil Anna] I hate to admit this, but Cybertron is my home. This is where I truly belong.
Ryan F-Freeman: Good. When you want to see me in somewhere like... uh... Camp Everfree. You could come and find me on Earth.
Evil Ryan: Wha? You mean... Earth? We would love to find and exterminate Cons on Earth.
Megatron: But I disbanded them. No one will try to reunite them. I can assure you that.
Bertram T. Monkey: So does we, Galvatron. If that's your nickname?
Bertram T. Monkey: What?
Megatron: Galvatron would be a good name. But I prefer to use my old name to avoid confusion.
Ryan F-Freeman: Ok. Sunset would see me when I become a Prime and a prince soon.
Megatron: Yeah. But any time you decide to come here again, we will be here. Waiting.
Evil Ryan: What about Unicorn however?
Megatron: I know his place. Out in deep space. He will not be able to cause trouble there.
Crash Bandicoot: Wait a second. Wait a second. I got a better idea where I can banish him to. Wasteland.
Cody Fairbrother: A world of forgotten characters who is ruled by Oswald the Lucky Rabbit. The perfect prison.
Oswald the Lucky Rabbit: I think it's a good idea, Crash.
Captain Hook: A fitting fate for such an evil mind.
[Ryan walk up the Allspark relic]
Unicron: Ryan! Release me! You tricked me!
Ryan F-Freeman: Sorry, Unicron. But it's the only way for you to get out of Megatron. If you try to get back in Megatron's body and get Sunset a villain, I'll crush you with my bere hands!
Unicron: Listen. Let me out and we'll split Cybertron. 70-30. Deal?
Crash Bandicoot: Nope.
Unicron: Wait, Ryan! What about 60-40?
Ryan F-Freeman: No. Not buying it.
Matau T. Monkey: [sings while opening a portal to Wasteland] Con. Do I look like I care?~
Ryan F-Freeman: No.
[Crash spins and sends the Allspark vessel through the portal]
Unicron: YOU AND RYAN WILL PAY FOR THIS, MEGATRRRROOOOOONNNNNN!!!!!!
[The portal closes]
Cody Fairbrother: Good riddance. Well. Megatron. I don't want to say "I told you so.", but... I told you so.
Bertram T. Monkey: Well. He's Black Phantom's problem now.
[Evil Ryan nods]
Ryan F-Freeman: There goes Unicron. Bye-bye forever.
Starscream: Yes. Well, we all have plenty to think about, don't we?
Evil Ryan: No! Like Megatron said the Decepticons are no more and that is final.
Evil Anna: C'mon, Sci-Ryan. Let's get us and Sunset to Earth.
Starscream: This is not quite how I envisioned my rise to the throne, but since lord Megatron all but surrendered it to me, I will gladly revive the Decepticons in my name. [sees the Predacons and screams] Though perhaps a throne is more befitting of an actual King.
Predaking: I am not here to seize thrones, Starscream but to settle scores.
[While the Predacons fight Starscream, Crash feels homesick]
Crash Bandicoot: [sighs] Ryan. You did well fighting Unicron but I miss home back on Earth.
Ryan F-Freeman: Then go back. It's not my decision.
Crash Bandicoot: Maybe we would go back after putting Midnight out of her misery by merging her with Sci-Twi.
Evil Ryan: If there are more Cons on Earth, we'll be ready.
[Crash thinks of an idea and starts doing to Megatron like he did to Crunch]
Megatron: What the? Ow! I'm good now. Hit with your legs, not with your back!
Ryan F-Freeman: Well, Sunset. I think I thought that Megatron was dead.
Sunset Shimmer: But Unicron revived him somehow. And now, I can really teach him about friendship.
Evil Ryan: We could do that. Could Ryan tell Megatron that Ryan is a Prime-prince?
Thomas: Well, Megatron. I think in Thomas' Human Adventure. Ryan will become a Prime-prince and help me get the Matrix back.
Ryan F-Freeman: And before you take Sunset's hand, I want to tell you something. Something I said to my 6 recruits: The Elements of Insanity.
Ryan F-Freeman: The Magic of Friendship doesn't just exist in Equestria or on Cybertron. It's everywhere. You can go to Earth and seek it out, or you can go to space and forever be alone. The choice... [sighs] is yours.
Megatron: My path has changed while I was under Unicron's influence. So I choose the first option.
Crash Bandicoot: Guess that all you ever done since you came to Neverland is help Hook find Peter Pan's hideout. How did Ryan find the Elements of Insanity?
Thomas: Maybe Ryan can tell you.
Megatron: [lets go of Sunset's hand] What?
Ryan F-Freeman: Well, I was walking to find some allies to fight Unicron and then I found these ponies and I ask them for help. This Rainbow Dash has weapons and her name is Rainbine.
[Rainbine looks at the gold token]
Crash Bandicoot: What's this, Rainbine?
Rainbine: It's a token. Might be from Earth or the ones Ryan and Brutalight created.
[Crash picks up a token]
Crash Bandicoot: It's a Yo-kai medal. It has a photo of a nine tailed fox. I'll just save that for Ryan when we get back to Earth. [to Megatron] Megatron. It is been an honour to fight me. If you want to help me in the Solar Flare Legend, you can always find us... on Earth.
[Megatron and Sunset smile at Crash]
Ryan F-Freeman: [grabs Sci-Twi's amulet] Sunset? Wanna go to Earth with Megatron?
Sunset Shimmer: Yes, Ryan. Will I see Twilight again?
Crash Bandicoot: You will, kid. [uses Sci-Twi's amulet on Sunset] You will.
[Sunset transforms into Daydream Shimmer]
Ryan F-Freeman: Twilight? I helped you, Thomas and Optimus with this.
[Twilight hugs Ryan]
Megatron: Sunset. Let's go to Earth.
[Megatron transforms to jet mode and flies off with Daydream]