The animated “Toy Story” franchise is all about nostalgia, so it’s fitting that four beloved comedy legends are jumping into Pixar’s fan-favorite toy box.

Betty White, Mel Brooks, Carl Reiner and Carol Burnett lend their voices to a quartet of baby trinkets in “Toy Story 4” (in theaters June 21), joining returning stars Tom Hanks and Tim Allen.

“The 'Toy Story' movies are not only great fun, but they have a lot of heart,” says Brooks, 92, who gives life to little pachyderm Melephant Brooks.

Each character not only has a punny name, but also a “natural personality” reflecting the individual icon, says director Josh Cooley: Burnett, 86, voices the kid seat Chairol Burnett; Reiner, 97, plays the adorably pink Carl Reineroceros; and White, 97, is teething toy Bitey White.

'Toy Story 4' trailer:Every parent knows Bonnie's 'spork' toy attachment and is crying

Bring on the tears: Tom Hanks dubs upcoming 'Toy Story 4' 'profound' and a 'moment in history'

“It was wonderful the way they incorporated our names into the characters,” White says. “And I’m a sucker for animals, so the tiger was just perfect!”

Adds Reiner: “To be represented by a cute little toy character is not the worst thing in the world.”

“Toy Story 4” finds Woody (Hanks) and the gang settling into their new roles as playthings for young Bonnie after their first owner Andy let them go in the previous film. And among the new crew are these four baby toys that are no longer in the spotlight for this little girl, reminiscing about the good old days when times were simpler.

“They’ve done their job and are just kind of waiting around for what happens next,” Cooley says. “And now that Woody's in there, they're accepting him into their circle and he's already pushing against that.

“Sometimes toys fall in and out of favor,” the director adds. “I look at my own kid and stuff that was the favorite toy yesterday is now in the closet. We wanted to show that Woody's new life in this bedroom is not exactly what he thought it was going to be.”

The director recorded longtime best friends Brooks and Reiner together in the latter legend’s living room, an experience that was “so surreal and so awesome,” says Cooley, adding that the two comedians riffed off each other to perfect their characters. “Mel hits me on the leg and goes, ‘Hey, I direct films, too, you know.’ Yes, I'm aware of that.”

Reiner says he and Brooks “had so much fun, I was surprised (they) paid us. We would have done it for nothing. But don’t tell Mel.”

Brooks, who was “flattered” to play a blue elephant, quips that “most of it was actually done separately because (Reiner) has a habit of grabbing the mic.” (Brooks’ favorite “Toy Story” character? His late pal Don Rickles’ Mr. Potato Head, who is included in the new film using archival recordings.)

Having the comedians be a part of “Toy Story 4” matches the nostalgia theme, Cooley says, and working with them brought back memories for him of watching Reiner on “The Dick Van Dyke Show,” as well as Brooks’ movies and “The Carol Burnett Show” growing up.

“All of these actors are so embedded in my childhood as much as ‘Toy Story’ is for my children," he says.