George Clooney revealed the advice he gave Ben Affleck on playing Batman was based off his own experience portraying comics’ greatest detective on film.

Clooney, who donned the Dark Knight’s mantle in the critically panned 1997 film “Batman and Robin,” told the Hollywood Reporter’s Awards Chatter podcast that he cautioned Affleck against taking the role.

GEORGE CLOONEY EXPLAINS WHY HE SUPPORTS HIS FRIEND MEGHAN MARKLE

“I actually did talk to him about it. I said, ‘Don’t do it,’” Clooney said. “It was only from my experience, which is, you know…”

Clooney was referring to his portrayal of the caped crusader in the Joel Schumacher-directed “Batman and Robin,” which he starred alongside Arnold Schwarzenegger, Uma Thurman, Chris O’Donnell and Alicia Silverstone. Critics derided the film at the time. It currently holds a 10 percent rating on Rotten Tomatoes.

Clooney, pictured left as the Dark Knight, said his negatively received performance of Batman led him to dissuade Affleck, right, from taking the role. (DC)

But Affleck didn’t take his friend’s advice. He donned the superhero mantle in three films, including “Batman v Superman: Dawn of Justice” (2016), “Justice League” (2017) and a cameo in “Suicide Squad” (2016). Clooney said that Affleck “did great” in the films.

The two-time Oscar-winner was attached to write, direct and star in a new Batman movie, but later decided to pass the mantle. Affleck explained that he “couldn’t crack it” during an appearance on “Jimmy Kimmel Live” in February.

Meanwhile, Clooney said that his shortcomings as Batman taught him a valuable lesson about the film industry.

"[Arnold] Schwarzenegger was paid, I think he was paid $25 million for that, which was like 20 times more than I was paid for it, and, you know, we never even worked together! We worked together for one day. But I took all the heat," Clooney said on the podcast.

CLICK HERE TO GET THE FOX NEWS APP

"Now, fair deal—I was playing Batman and I wasn't good in it, and it wasn't a good film, but what I learned from that failure was that I had to rethink how I was working because now I wasn't just an actor getting a role, I was being held responsible for the film itself."

Fifteen years after playing Batman, Clooney would go on to work with Affleck on the 2012 drama, “Argo,” which took home the Oscar for Best Picture.