Jane Adams plays a middle aged actress trying to get by in "All the Light in the Sky."Credit: Getty Images

It took five minutes after meeting for actress Jane Adams and independent filmmaker Joe Swanberg to want to work together again. It was 2008 and she was playing a small role in his film “Alexander the Last.” “It was one of those cases were you meet someone and you instantly understand one another,” says Adams, a Tony winner for 1995’s “An Inspector Calls” and a co-star of “Happiness” and HBO’s “Hung.” They started discussing a film about a middle aged actress whose life lacks a certain stability, to be played by her. He said he would try to make it in November.

“I didn’t know him well enough at the time to know he would actually follow through, but he did,” Adams recalls, chuckling. It didn’t actually happen: The film they wound up making went in a different direction, namely the meta-horror “Silver Bullets,” in which she also played a small part. “We both knew we were going to have to make this movie another time.”

“All the Light in the Sky” wound up being filmed in 2011, mostly at her own strange beachside apartment in Malibu. It was made in December, when the tide is so high it actually looks like the place — tiny, shoeboxy and much more affordable, she says, than Brooklyn — is actually out in the Pacific Ocean.

Putting the project off gave them extra time to think it through and develop it. They would hash it out over emails and text messages, sometimes over the phone. “We both have an aversion to paper,” she says.

Still, she didn’t completely feel she wrote it. “I was more surprised that Joe gave me the writing credit than not,” she confesses. This might speak to the loose style of Swanberg’s films — also including “Hannah Takes the Stairs” and the recent “Drinking Buddies” — but they’re not that loose.

“It’s more planned out than people think,” Adams explains. “What looks totally off-the-cuff in a Joe Swanberg film at this point is not. He makes actors look so comfortable that it winds up looking like they just said their lines at the at time in that moment. But it’s not.” (This might happen sometimes, she admits.)

The film is largely plotless, more a portrait of a time in Adams’ character’s life, as she deals with intimacy issues and a beloved niece (Sophia Takal) who visits. Though she admits the inspiration for the story was “life,” she doesn’t detail what parts, exactly, mimic her life, beyond it being about someone her age, in her profession and in a former apartment.

“Whenever I play any kind of character, there’s so much of I’m drawing from so much of my life anyway. This didn’t feel that much different,” she explains. It is a change of pace from playing often exaggerated, comic characters, as in “Wonder Boys,” “The Anniversary Party,” “Orange County” and “The Wackness.”

One aspect of the film she particularly loves involves a scientist her character, who’s prepping to play a solar engineer, talks (or mostly listens) to about global warming and the slow death of the sun. “It’s a metaphor for middle age, but also for anyone. Everyone’s growing old. It’s death and decay,” she says.

The idea of accepting aging and the idea that we’re just passing through en route to death even extends to the way her character deals with relationships. “It’s just biology that men are looking at younger women. It’s a natural process. It’s not bad behavior. It’s biology, nature,” she explains. “Nature is this thing that makes people uncomfortable. You tell people that the seas are eroding, and it makes people uncomfortable. How can we control that? Maybe we can’t control anything.”