When defender Ben Sweat joined New York City FC on a trial in the preseason, his play was inconsistent, a product of a new club, a return to MLS.

“I was nervous,” Sweat told The Post about his rocky preseason. “But I was more anxious because I knew I could play and perform. It was just going to take some time.”

Sweat, 25, didn’t even get to sniff MLS competition before coming to The Bronx. The Columbus Crew drafted him in the first round in the 2014 MLS draft, but he never logged a professional minute in the league. He went on loan to the Crew’s USL affiliate, the Dayton Dutch Lions, before leaving Columbus in 2015 for the Tampa Bay Rowdies, where he finally logged meaningful minutes in the North American Soccer League.

So Sweat needed time to adjust to being back in MLS, to new players, to coach Patrick Vieira’s confounding tactics. In essence, he just needed to get comfortable.

“I needed to test myself again,” Sweat said. “I knew that I didn’t get a fair shake at Columbus.”

But what he did get was revenge against Columbus in NYCFC’s 3-2 win last week. He started at left back in place of injured Ronald Matarrita.

“I could have played against any other team,” said Sweat, who offers an appetizing option off the bench when Matarrita returns. “It was kind of ironic that it turned out to be my debut against my old club.”

Sweat’s debut wasn’t an immediate Disney classic. In the opening moments, he received a yellow card for pulling down Crew midfielder Ethan Finlay. But shortly after, he settled down to make timely tackles while playing with controlled aggression. He did everything Vieira looks for in a wingback, especially on offense. In the second half, with NYCFC trailing, 2-1, Sweat lofted a swirling cross into the Crew box that midfielder Yangel Herrera headed for a goal.

“This is why we wanted to keep him because he fit well with the way we want to play,” Vieira said. “He can play as a left back, he can play as a central back as well. He’s a good catch for us.”

Sweat’s performance figures to earn him the start again at left back when NYCFC (13 points) play host to their Southern look-a-like Atlanta United (11 points) on Sunday at Yankee Stadium.

Led under ex-Argentina and Barcelona coach Gerardo Martino, Atlanta plays a similar attacking style to NYCFC, but instead of building from the back, Atlanta looks to press higher on the field and run. They like to bury teams early, as they’ve scored four times within the first 15 minutes this season.

The expansion side springs forward with youngsters like forward Hector Villalba and midfielder Miguel Almiron spearheading the attacking. Nevertheless, they will be without one of their key midfielders, Yamil Asad, who is suspended for the match.

Nevertheless, Vieira warned NYCFC must keep things tight early.

“If we are not matching the desire on the competitiveness from the start, if they manage to score first, it’ll be very difficult for us,” Vieira said.

Kids run the bases? How about a shot on goal at Yankee Stadium.

As part of Family Day, 50 lucky youngsters will get the opportunity to take a shot on NYCFC’s goal following Sunday’s match against Atlanta.

NYCFC announced fan-themed events throughout the stadium, from face and hair painting, to reduced food prices, as well as a chance to go down to the field level and snap selfies on the field.