When California passed Prop 8, barring same-sex marriage in the state, six-time Tony winner Audra McDonald took it personally.

The actress, starring in ABC series “Private Practice” at the time, isn’t gay, but felt compelled to join Twitter (handle: @AudraEqualityMc) to raise her voice in protest. “I was so speechless and furious and in shock,” she recalls. “I’ve always had gay friends and family members and people who are my mentors and my surrogate parents. Seeing their rights denied, and being a beneficiary of the civil rights movement myself, I just needed to make myself heard.”

McDonald is on the advisory committee for Broadway Impact, the marriage-equality advocacy group co-founded in 2008 by actors Gavin Creel and Rory O’Malley (and which produced starry fundraiser readings of Dustin Lance Black’s play “8” on Broadway and in L.A.). This year, she was one of the theater world’s loudest voices in protesting Indiana’s anti-gay Religious Freedom Restoration Act.

McDonald’s commitment to the cause is reflected in the entire Broadway community, which has always had a deep engagement in the fight for gay rights — perhaps more so than other sectors of the entertainment business.

“I think it’s because the theater industry is like a campus based around these 10 blocks in Midtown Manhattan,” says Tom Viola, the longtime executive director of Broadway Cares/Equity Fights AIDS, which since the late ’80s has raised and distributed money to stop and treat HIV/AIDS. “We run into each other on the street, and we live with each other day-in and day-out, and it creates this sense of wanting to take care of each other that might not exist in other areas of the entertainment industry. It makes you willing to embrace diversity, and also to make sure everyone’s treated fairly.”

For 25 years, BC/EFA has been the reason Broadway theatergoers can spot cast members standing by the exits holding buckets for donations, in a semi-annual effort to raise funds. The group also has raised millions with events ranging from teddy-bear auction Broadway Bears to stripathon Broadway Bares.

The Rialto has always been ahead of the curve in terms of gay subject matter, too. Mae West’s 1927 play “The Drag” may have been shut down before it reached Broadway, but in 1934, Lillian Hellman’s “The Children’s Hour” — about two teachers accused of having a lesbian affair — ran for two years, despite the fact that onstage discussion of homosexuality was illegal at the time. In 1983, at the height of the AIDS crisis, “La Cage aux Folles” became a mainstream Broadway hit (with a book by Harvey Fierstein, whose “Torch Song Trilogy” is also cited as a milestone.) Landmarks ranging from AIDS-era drama “The Normal Heart” to Pulitzer winner “Angels in America” helped pave the way for this year’s Tony champ, “Fun Home,” about a lesbian cartoonist coming to terms with her father, a closeted gay man.

In accepting the best actor trophy for “Fun Home,” Michael Cerveris made a plea for marriage equality. But then, the Broadway community has never been afraid to use the telecast of the Tonys as a platform: In 2003, Marc Shaiman and Scott Wittman made waves when they celebrated their Tony for the “Hairspray” score with a nationally televised kiss.

Pop culture has come a long way since, and so has theater, which in 2014 handed four Tonys to the revival of “Hedwig and the Angry Inch” when, 15 years earlier, the fledgling show about a transgender rocker was turned down by seemingly every Off Broadway theater in the city.

The revival became a box office sensation last year, thanks in part to Neil Patrick Harris, who opened “Hedwig” in April 2014, soon after the finale of his CBS sitcom “How I Met Your Mother.”

“Here we were, watching this father of two who is mainstream America’s best friend and drinking buddy, play a transgender character in full drag and wig, on a Broadway stage, with an audience that was a decent cross-section of the American public,” recalls “Hedwig” co-creator Stephen Trask. “We couldn’t have done it 10 years ago.”

Despite all the strides, the theater community acknowledges there’s work to be done. That was highlighted in 2013, when the appearance on the Macy’s Thanksgiving Day Parade of Tony winner “Kinky Boots” — and its cast featuring male actors in drag — stirred conservative outrage on social media.

“All the legislation in the world can’t change people’s hearts,” notes playwright Terrence McNally, whose work has long depicted gay life with frankness, from 1975 bathhouse sex-farce “The Ritz” to drama “Love! Valour! Compassion!” His most recent play, “Mothers and Sons,” focuses on lingering homophobia in a marriage-equality world.

And don’t ask Larry Kramer, the activist and writer of works including “The Normal Heart,” to celebrate how far we’ve come. “There is too much work yet to be done,” he says, “to be able to look back and congratulate anyone.”