The stars and executive producers of HBO’s “Girls” were on hand at Hollywood’s annual PaleyFest at the Dolby Theater on Sunday afternoon, and creator Lena Dunham exhibited her trademark candor during the panel, addressing everything from her online critics to the show’s controversial sex scenes.

The Q&A was moderated by executive producer Judd Apatow, who wasn’t afraid to query Dunham about her politics and the divisiveness of the buzzy series.

“I stopped looking at my own Twitter. I send the tweets to someone… and she posts them for me — she lets me know if there’s an important response,” Dunham said of engaging with fans on social media. “It became a little too much. This is advice I would have for everyone — whether you have a million followers or whether you have seven followers, because we all deal with the complexity of people being able to say things to you anonymously from behind the veil of the internet — which is that you think you can take it all, like, ‘oh my god, that’s so funny, somebody called me a fat cow who deserves to be dragged through the street,’ but it does affect you internally. I was like ‘the spelling’s so bad, I’m not taking these people seriously.They have eggs for avatars, I don’t care!’ And you walk through the day and these horrible phrases are being repeated through your head… There are things that affect me. I’m weird, I’m affected by violence, threats of rape — I’m a mess!”

While Dunham downplayed her comments with a wry tone, the criticism that she and the show receive clearly has an impact, and the producers are cognizant of the vitriol the series generates — which was part of the reason why they created the character of Ray (Alex Karpovsky), to be, in Apatow’s words, “the voice of other people’s interpretation of how ridiculous the girls’ behavior was.”

“One of Ray’s responsibilities, as I understood it… was to call the girls out before the critics and everyone else had a chance to — taking all the ammo out of them,” Karpovsky explained.

“And it took all the ammo away; no one’s criticized us ever — it totally worked!” Allison Williams quipped.

“I always think certain writers don’t understand that we know what we’re doing with the characters,” Apatow added. “Like we’re unaware of an awful choice or how annoying they are in a scene — but that’s the whole point.”

Karpovsky agreed, adding, “I was asked to inject a bit of perspective and bigger picture into these girls’ lives, their relationships and their struggles: sometimes their ‘struggles’ and sometimes their legitimate struggles. Ray helps put the quotes on those.”

Still, Dunham said that within their private bubble of creating the series, they don’t pay too much attention to outside opinions: “I think something that’s been really amazing is, we spend all year long working on the show. Whether we’re receiving praise or receiving criticism, we’re together as a team trying to push the ball forward and continuing to tell stories about these characters we’ve come to love so much. It feels like I have a very stable, delightful family who are always sheltering me. We’re all encouraging each other to continue on, and our focus really remains on the work. I think what would be dangerous is if we became too invested in what the internet was or wasn’t saying, what awards we were or weren’t getting, but because it’s always been so much about the show… to come here and see all of you, it’s so surreal. Until this moment, we don’t necessarily believe anyone’s watching.”

Andrew Rannells’ scene-stealing character Elijah was initially brought on for one episode, but soon became a permanent fixture thanks to the “Book of Mormon” star’s performance. “The character was written really differently, like a mealy, granola-y hippie, who was anxious and wearing a hoodie,” Dunham explained. “And Andrew came in and played it in the freshest, most surprising, most crazy way.”

Dunham will soon be appearing in a guest spot on ABC’s “Scandal,” and while she didn’t drop any hints about her role, she admitted that it’s always a culture shock for her to go onto another set. “Every set has its own ecosystem and culture… we are often surprised to find how uniquely supportive the vibe on our show is. I did ‘Scandal’ and I cannot speak an ill word of them, their set is a delight, but I definitely was not in my underpants at craft services.”

As sex is a big part of “Girls,” it didn’t take too long for the conversation to turn to the show’s more controversial scenes, particularly Marnie’s sex life. “I haven’t counted, but I think Marnie may have had the most sexual partners of any of us,” Dunham noted, praising Williams: “She never says no to anything. She asks why and how and asks really great questions that help push us further, but she’s game to do whatever the character needs to do.”

One of the most memorable scenes this season came in the premiere, with Desi ((Ebon Moss-Bachrach) performing a particularly explicit sex act on Marnie. Exec producer Jenni Konner admitted that with any sexual positions on the show, “we take a photo of Lena and I doing it, clothed,” and send it to the actors to show them what they’re envisioning.

“We really try on the show — and people may laugh at this — to do sex that really pushes the characters and the plot forward and doesn’t feel gratuitous,” Dunham added. “I’m sure someone would have a quibble with that, but what we really saw in that first episode was that Marnie was the most vulnerable she’d ever been.”

Williams agreed, “The dialogue was that Desi said, ‘I loved that,’ and Marnie said, ‘I love you too,’ it’s everything you need to know. In 12 seconds you’re brought up to speed about where Marnie is emotionally, physically — it’s so economical.”

For Dunham, one of the show’s main responsibilities is to show women that are fully-realized and don’t always have to be likable: “We have an essential belief that being complex, annoying and multifaceted is the right of women on television, and therefore, to see characters you don’t necessarily adore all the time is hopefully, in some way, an inherently feminist attribute, because it’s a form of representation we’ve been lacking for a long time.”

As for Dunham’s aspirations for the show in future seasons, the multi-hyphenate said, “Like a campsite, I want to leave all our characters better than we found them… to take these girls to the next phase of their life. Something that’s amazing at working at HBO and not on a multicam sitcom, is we really are allowed to let these characters grow and develop and change. There’s definitely fantasy storylines that we’re working towards.”

“Girls” airs Sundays at 9 p.m. on HBO.