Kaley Cuoco and Johnny Galecki could have let their relationship status affect their careers but instead, the two actors kept it professional.

The two "Big Bang Theory" co-stars dated each other during the first few seasons of their hit CBS sitcom but then broke up after two years together. 

“We dated really early on for almost two years. When we did the pilot, I was crushing so hard on Galecki but he had a girlfriend,” Cuoco, 34, told Dax Shepard on his podcast, "Armchair Expert."

Cuoco starred as Penny in the Emmy-winning series while Galecki, 45, played Leonard. The characters ended up falling for each other and getting married on the show. 

KALEY CUOCO CELEBRATES HER SECOND WEDDING ANNIVERSARY WITH KARL COOK

“We got together and just fell mad for each other for two years, but then we broke up,” Cuoco said. “Luckily Johnny and I came out of it so brilliantly and we’re closer today than we ever were.”

Penny (Kaley Cuoco) and Leonard (Johnny Galecki). The characters ended up falling for each other and getting married on the show.  (Darren Michaels/Warner Bros. Entertainment I)

The actress admitted that right after the breakup things were "a little sensitive for a minute" but it was "Big Bang Theory" creator and writer, Chuck Lorre, who helped them out. 

‘BIG BANG THEORY’ STAR JOHNNY GALECKI EXPECTING FIRST CHILD WITH GIRLFRIEND ALAINA MEYER

“I remember those weeks that Chuck had written these episodes where all of a sudden our characters were like sleeping together every other second,” she recalled. 

Now, Kaley Cuoco is married to equestrian Karl Cook.  (Getty)

“Johnny and I talk about it and I think [Chuck] did that on purpose — just to f--- with us,” Cuoco joked. "If I was with him, I would ask him because that came out of nowhere. All of a sudden these characters were all up on each other."

Galecki told CBS Watch! magazine back in November 2013, “We’re dear friends, still. Kaley’s not just an ex, she’s a part of my life. It was a wonderful relationship, but we never spoke a word about it and never went anywhere together.”

CLICK HERE TO GET THE FOX NEWS APP

Now, Cuoco is married to equestrian Karl Cook and Galecki has been dating Alaina Meyer since 2018. They share a son together.