(CNN) — The character of Dwight Schrute on “The Office” brought viewers joy, but not the man who played him.

During a recently published appearance on Bill Maher’s “Club Random” podcast, Rainn Wilson shared that he was not happy while filming the beloved series.

“When I was in ‘The Office,’ I spent several years really mostly unhappy because it wasn’t enough,” Wilson said. “I was making hundreds of thousands. I wanted millions, and I was a TV star, but I wanted to be a movie star. It was never enough.”

The actor’s Peacock show, “Rainn Wilson and the Geography of Bliss,” debuted in May and follows him on his quest around the world trying to find happiness.

He told CNN just before the premiere, “Anxiety is something I’ve dealt with my whole life.”

“Depression comes and goes,” he said. “Loneliness and disconnection, alienation as well, kind of all the symptoms of the modern world. So what an amazing opportunity to have a personal journey. I got to transform.”

Wilson talked to Maher on the podcast about sorting out his feelings about his time on the hit series.

“This is what I’m looking at now and realizing now: I’m on a hit show, Emmy nominated every year, making lots of money working with, like, Steve Carell and Jenna Fisher and John Krasinski and these amazing writers and incredible directors like Paul Feig,” Wilson said. “I’m on one of the great TV shows. People love it. I wasn’t enjoying it.”

Despite all the success, it wasn’t enough for him.

“I was thinking ‘Why am I not a movie star? Why am I not the next Jack Black or the next Will Ferrell?’” he said. “How come I can’t have a movie career? Why don’t I have this development deal?’”

Wilson’s book “Soul Boom: Why We Need a Spiritual Revolution” was published in April.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox