Jim Carrey Delivers Commencement Speech, Receives Honorary Doctorate (Video)

The actor tells grads of Iowa's Maharishi University of Management, "You could fail at what you don't love, so you might as well take a chance on doing what you love."

In a commencement speech Saturday, Jim Carrey said witnessing his father struggle as an accountant inspired him to make the riskier choice of going into comedy.

"My father could have been a great comedian, but he didn't believe that that was possible for him, and so he made a conservative choice. Instead, he got a safe job as an accountant," Carrey told graduates of the Maharishi University of Management in Iowa.

Carrey said his father, Percy Carrey, lost his accounting job when the actor was 12, and the family then "had to do whatever we could to survive."

"I learned many great lessons from my father, not the least of which was that you could fail at what you don't love, so you might as well take a chance on doing what you love."

VIDEO: 'Office' Actor Ed Helms Delivers Cornell Address

Carrey also told the graduates the secret to success is "letting the universe know what you want and working toward it."

"Your job is not to figure out how it's going to happen for you, it's opening a door in your head, and when the door opens in real life, just walk through it," he said.

Carrey received the honorary degree of Doctor of Fine Arts Honoris Caus during the graduation ceremony. Maharishi University was founded by transcendental mediation pioneer Maharishi Mahesh Yogi. Carrey has attended transcendental mediation retreats at the university in the past.