Robin Williams' death led Sarah Michelle Gellar to press pause on her acting career.

Gellar, 45, spoke about how she processed Williams' passing in a new interview. The two worked closely together on "The Crazy Ones" in 2013 and 2014.

"I've been working my entire life," she told People magazine. "When I had kids — and it was right after Robin passed away — there was just so much going on in my life and I just said, ‘I need to take a break.’"

Robin Williams and Sarah Michelle Gellar on "The Crazy Ones"

Sarah Michelle Gellar revealed Robin Williams' death led her to take a break from acting. (Richard Cartwright/CBS via Getty Images)

‘MR. BELVEDERE’ STAR ILENE GRAFF RECALLS WORKING WITH ROBIN WILLIAMS, RODNEY DANGERFIELD: ‘I WAS JUST IN AWE’

Williams died by suicide on Aug. 11, 2014.

The comedian struggled with addiction throughout his career and had completed a rehab stint shortly before his death. Following his death, it was found that the actor was suffering from Lewy Body Dementia.

"It is important to note that patients with diffuse Lewy Body Dementia frequently present with Parkinsonian motor symptoms and … depression and hallucinations," the pathology report said at the time.

Gellar later chose to take a break from acting to focus on time with her family.

Robin Williams and Sarah Michelle Gellar starred in a TV show together

Sarah Michelle Gellar starred alongside Robin Williams in "The Crazy Ones" before the actor's death in 2014. (Sonja Flemming/CBS via Getty Images)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

"I need to be here for these early formative years of my kids' life," Gellar recalled thinking after her co-star's death. "I needed that break to be the parent that I wanted to be."

However, the "Scooby-Doo" actress found she was not ready to completely give up on the industry.

"I started to really miss it," Gellar recalled. "But it's also finding the right opportunity, something that speaks to you that also speaks to your audience."

Gellar found that opportunity with the show "Wolf Pack." The actress stars in the Paramount+ series and is an executive producer.

Robin Williams and Sarah Michelle Gellar on the red carpet

Williams and Gellar were on-screen father and daughter in "The Crazy Ones." (Laura Cavanaugh/FilmMagic via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"It's about working with people that I really love working with, where I look forward to spending time with the people," the actress told the outlet. "I want everyone to have a good time because look, acting's fun. We're creative, and yeah, sometimes the nights are really long, but what we get to do is really cool."