Australian actor Keiynan Lonsdale says he was inspired to come out while filming the gay teen romantic-comedy Love, Simon.

In the film from out director Greg Berlanti, 17-year-old Simon (played by Nick Robinson) begins corresponding with another closeted high school student. The film opens Friday, March 16.

(Related: Love, Simon star Nick Robinson says brother came out gay while filming movie.)

Lonsdale, who came out bisexual in an Instagram post last year, said that he decided to come out while filming the movie.

“Doing Love, Simon was really inspiring to me,” he told LGBT glossy OUT. “I thought, Wow, I’m doing a film about equality and coming out, and the director has his partner and their child on set, and everyone’s so supportive and loving, and yet here I am still hiding. At what point am I going to be able to be myself? I realized it had nothing to do with anyone else. It was just me holding myself back.”

Lonsdale, 26, added that being closeted had become a “full-time job.”

“I was making decisions based on fear. I was altering my personality and the photos I’d put up on social media and the emojis I’d use – every little thing. It was a full-time job. What that does is keep building shame, without you even realizing it. Honestly, I didn’t come out to inspire others. I couldn’t actually process anybody else’s thoughts, because that’s what was keeping me afraid. I did it for myself, but then, once I realized the effect it had on other people, it became this beautiful thing. And I can go anywhere now and be me. I’m a better actor, a better musician, and a better person,” he said.