Dan Fogler is a native New Yorker, born in Brooklyn, and so when it came to his character of Jacob Kowalski in the new film “Fantastic Beasts and Where to Find Them,” he felt a kinship.

Jacob is a simple guy with ambitions of being a baker. In the film set in the world of J.K. Rowling’s “Harry Potter,” Jacob gets caught up in a magical adventure in New York City in 1926 with Newt Scamander (Eddie Redmayne).

“As soon as I read what that they gave me, I was like, I know this guy, I understood this character, he’s very close to home,” the 40-year-old actor says. “He’s from New York, I’m from New York. I grew up in Brooklyn. I just kind of felt like I knew him. ... It felt like it was written for me. Every once in a while you get one of those parts where you’re like, ‘Wow, I can hit this out of the park,’ and hopefully you get a chance to.”

Jacob is a no-mag — what they call muggles in America — and he runs into Newt at a bank. Jacob is there to try and get a loan to open a bakery. Newt is there chasing an escaped fantastic beast.

The two share very similiar-looking briefcases, which get mixed up, and soon they are quickly linked together as they try to find the missing beast in New York City.

Though it’s not actually New York City, but rather an elaborate set built in London. Still, even Fogler was impressed.

“That was amazing, to be able to look up and just be like, ‘I know this street and I know how to get to that street’ because they basically rebuilt half of New York on the lot there,” he says. “You could walk the street and get lost and look up at the street signs and know the names. It’s so intricate. You open up the doors and there would be a full restaurant in there. That’s the attention to detail. It was just A-plus.”

The film also gave Fogler the opportunity to act in a film set during a favorite time period, which he says really took shape with all the extras on set decked in three-piece suits and the women as flappers, not to mention the cobblestone streets with horse-drawn carriages.

“I love the era, the ’20s and I just loved the potential to pay homage to all my favorite black-and-white-movie stars, like Chaplin, Laurel and Hardy and Abbott and Costello. And Eddie Redmayne did as well. And it was quite a joy to be able to add those nuances.”

As Fogler proclaims how well he knows his character, and how close to home Jacob is, the natural question would be about his baking skills.

“I’m OK, I’ve been known to bake every once in a while,” the actor reveals with a chuckle. “I like baked goods. I certainly like eating baked goods.”

In order to full get into his character, he started a tradition of croissant Fridays, where he would bring in boxes of the pastries, which he picked up from a bakery by his apartment.

“I was living next to this Italian bakery that made these croissants in the morning and the smell just wafted into my apartment,” he says excitedly. “At first, people were like, ‘Yay, croissant Fridays!’ After a while, they were like, ‘Jesus, I can’t stop eating,’ because you couldn’t eat just one. It was just so buttery delicious.”