After Joseph Gordon-Levitt finished his spec script for “Mr. Corman,” the Apple TV Plus series about a young man with musical aspirations who struggles with anxiety, he showed it to director Rian Johnson. The two have collaborated on such projects as “Looper” and “Knives Out” and have come to know each other well. So well, in fact, that Johnson’s feedback of, “I know you and I know you’ll want to play in puddles of fantasy” helped turn the project from a simple live-action comedy to one that dabbles in animated musical moments and magical realism.

“From that point forward I really wanted to play with the subjectivity,” Gordon-Levitt tells Variety. “Realism is great and I love Cassavetes movies, for example, but I also really love Terry Gilliam or Michel Gondry — filmmakers that aren’t necessarily showing what real life looks like objectively, but are showing what it feels like subjectively. And so, I really wanted to kind of bounce back and forth between that objectivity and subjectivity — that realism and the fantasy.”

“Mr. Corman” is a 10-episode series that drops its first two episodes on Aug. 6, followed by weekly installments for the rest of the season. It’s also a project that Gordon-Levitt conceived of for himself (“I honestly can’t imagine what it’s like to be a screenwriter who just writes something and then hands it over and other filmmakers and other actors do it,” he admits.) and for which he pulled pieces from his own life. He does a full auteur turn as writer, executive producer, director and star. But even though “a lot of my favorite art comes from artists taking a good, deep, honest dive into themselves,” he says, his eponymous character Josh is “not someone who’s experiencing exactly what I’ve personally experienced; the character’s an amalgamation of some feelings I’ve had and some feelings that other people I’m close to have had.”

This is most obvious in the fact that while his character struggles to create music, Gordon-Levitt has had a successful career in the arts for more than three decades; he is currently nominated for a third Emmy, the second consecutive nod for the interactive program “Create Together,” which won him his second statue last year. (His first came back in 2014 for “HitRecord on TV.”) But Josh is a teacher, which Gordon-Levitt expresses interest in doing some day.

“When I was thinking, ‘Well if I hadn’t happened to get the breaks that I’ve had in show business and this wasn’t the way that I was able to earn my living, what would I do?'” he shares. “I’ve always thought that teachers should have the glory that entertainers do. I wish we lived in a world where teachers were the celebrated ones, and maybe this is one miniscule baby step in that direction. I hope that ‘Mr. Corman’ can really valorize teachers.”

Some of Josh’s struggles come from his anxiety, which appears much more crippling than anything Gordon-Levitt has experienced.

In the second episode, for example, Josh endures panic attacks so terrible he has to ask his school to find a substitute teacher for him at the last minute, his roommate (Arturo Castro) has to create a makeshift weighted blanket to help him, and when he tries to work on his music, he simply can’t.

“Having spoken to a doctor of neuropsychology, I asked her, ‘What would be your biggest fear, and what would be your biggest hope for Hollywood portraying this kind of thing?’ And she said, ‘What I really, really want is for it to be normalized and not stigmatized.’ And we kept that in the front of our mind the whole time. We want people watching this to know that this is something that a lot of people are going through in various ways, and hopefully this can help start a conversation,” Gordon-Levitt says.

Josh’s anxiety becomes a plot point early on in the series because Gordon-Levitt wanted the audience to meet him and “see how he is, and then throughout the rest of the season you learn more and more about why he’s that way.” However, just because things get so serious in only the second episode does not mean the story will get progressively darker over the course of the season.

“By the end of this season, he is finding a way for his creative outlet to be cathartic and healing for him,” Gordon-Levitt reveals. “This is actually a series with a lot of hope and light.”

Some of that lightness comes in the magical realism moments when the show breaks format to follow Josh (and at times other characters, including his mother, played by Debra Winger), as they reveal inner emotions through song and dance.

“You’re asking the actors to take a leap of faith when they’re acting on a green screen,” Gordon-Levitt says. “Debra Winger flat out said to me, ‘I hate this shit.’ But she did it in a way where she never for one moment was anything other than gung-ho and I think part of that was, I was there with her. I wasn’t just asking her to stand in this weird empty void and try to conjure real emotions, I was doing it together with her.”

“Mr. Corman” streams new episodes Fridays on Apple TV Plus.