George Gaynes, who played a grouchy foster parent on the 1980s sitcom “Punky Brewster,” the beleaguered commandant in seven “Police Academy” films and a soap opera star with a crush on Dustin Hoffman in drag in the Hollywood hit “Tootsie,” died on Monday at his daughter’s home in North Bend, Wash. He was 98.

His death was confirmed by his daughter, Iya Gaynes Falcone Brown.

With his baritone voice, chiseled good looks and versatility as a character actor and singer, Mr. Gaynes appeared in hundreds of episodes of sitcoms and dramas on television, 35 Hollywood and made-for-TV films, and many plays, musical comedies and operas in New York and Europe.

Critics often applauded his work in supporting roles, and his face became familiar to millions of Americans. But he never achieved leading man stardom.

“Anyone who believes in happy endings will take consolation from the career of George Gaynes, about to become a television celebrity at the age of 64,” The New York Times reported (erroneously; he was 67 ) in 1984, shortly before NBC telecast the first episode of “Punky Brewster.” The show ran for four seasons, first on NBC and then in syndication.