After not being drafted, Knicks guard Allonzo Trier, right, has had a strong first week in the NBA. The former Arizona Wildcat, playing on a two-way contract, is averaging 12.7 points and 2.7 rebounds. The Madison Square Garden crowd gave him a round of applause for his 15-point effort Saturday.

NEW YORK — In his very first NBA game, Allonzo Trier got the basketball at the top of the three-point line at Madison Square Garden, drove past Trae Young and proceeded to dunk over several members of the Atlanta Hawks.

The play made No. 3 on “SportsCenter’s” Top 10 on Oct. 17 and Trier finished with 15 points in his NBA debut. But the former Arizona standout says it may not have even the best dunk of his to ever appear on ESPN.

“It was cool, I mean it’s not the first time I’ve been on ‘SportsCenter’ for dunking a ball,” Trier told the Star on Saturday night at the Garden. “I was on a few times in college and high school as well. But it was a cool moment, especially in the Garden for opening night.

“The atmosphere was great, so I think that kind of made it better.”

After going undrafted out of Arizona, the 6-foot-5 Trier has been a pleasant surprise for the rebuilding Knicks while playing on a two-way contract. He’s averaging 12.7 points and 2.7 rebounds through three games.

Against the Celtics on Saturday, he didn’t start but was on the court during crunch time of a 103-101 loss. He finished with 15 points on 4-of-9-shooting, including 2 of 3 from deep. When he left in the first half, the Garden crowd applauded him.

“He has a chip on his shoulder, I mean what more can you say?” said Tim Hardaway Jr., the Knicks’ leading scorer. “He should be that way. We’re happy that he’s here, we’re happy he’s a part of our team and we’re going to keep feeding him the ball when he’s cooking like that. He’s a smart player, he defends and he’s active.”

“I’ve been really happy with Allonzo,” first-year Knicks coach David Fizdale said. “He might be our biggest competitor. He’s fearless, he’s really taken the challenge defensively. I’ve been really happy with that part of it.

“It’s a big learning lesson for him, too. He has his strengths, but he has to work other things into his game to make him a complete player, but overall I’ve been really happy with him.”

Fizdale isn’t Trier’s only fan.

Allonzo Trier is allowed to spend only 45 days with the Knicks this year as part of his contract. “I’m sure we’ll figure out soon” how he can best be used, Trier said.

Deandre Ayton, Trier’s teammate last season with the Wildcats and the No. 1 pick in the NBA Draft, has been keeping an eye on Trier from Phoenix, and the two regularly talk and text.

“We’re really good friends, we were probably best friends when we were there,” Trier said of Ayton, who will make $8 million this season compared with the $385,000 Trier could potentially earn. “I lived in a house probably two doors down (at the UA) and we’ve been really close since Day One when he stepped on campus, so we’ve just continued our friendship and our bond.”

Like Trier, Ayton had a strong NBA debut, putting up 18 points and 10 rebounds as the Suns beat the Mavericks on Oct. 17.

“He’s been excited about playing in the NBA,” Trier said. “He just said, ‘Look where we came from,’ so it’s been really cool.”

The 7-foot-1 Ayton has been impressed with Trier’s first week in the NBA.

“Yeah, he says he watched me,” Trier said. “He says, ‘Dang, man, you’re killing it, that’s awesome.’ He’s just being a guy that’s supporting one of his friends, and I’m doing the same thing.”

Trier and the Knicks host Ayton and the Suns on Dec. 17, and then visit Phoenix March 6.

“We’re representing Arizona,” Trier said. “There’s a lot of us that are doing that out here in the league so we want to go out there and represent yourself in a good way, represent the organization, represent the alma mater that you played for.”

New York Knicks forward Kristaps Porzingis, right, and guard Allonzo Trier react as they watch the game action from the bench during the first half of an NBA basketball game against the Atlanta Hawks, Wednesday, Oct. 17, 2018, at Madison Square Garden in New York. (AP Photo/Mary Altaffer)

Despite being a well-coveted prospect since he was in middle school, Trier went undrafted last June. In February 2018, Trier was ruled ineligible by the NCAA after testing positive for a banned substance. He appealed, took another urine test, and was ruled eligible in time for Arizona’s March 1 win over Stanford.

Still, he believed he would always land in the NBA, and now the Knicks are looking smart for signing him.

“I want to play great regardless of whether I was picked or not picked,” he said. “I put a lot of time and effort into my craft, and trying to be the best player I can be. As far as (other teams) realizing the player I was, I’m sure probably knew, some probably just didn’t know.

“I don’t know, I can’t really tell you why or what swayed the decisions to not take me, but I do know that I do belong in this league and I expect to play here for a long time.

“I’m just going to continue to work to get better and improve and improve.”

Trier likes the wide-open NBA game and believes his style is more suited to the “3-And-D” NBA style.

“The way the game is played is two totally different games,” Trier said. “College is a lot more compact, you can crowd the floor. And it’s played different than the way it is in the NBA. So I’m getting adjusted.

“One thing that’s good about me, I know how to adapt fast. I figure things out very fast, I’m a quick learner and I’m student of the game that studies. So I’ll continue to get better as more games go on.”

Trier is part of a young Knicks core that includes former Kentucky wing Kevin Knox and big man Mitchell Robinson, the Knicks’ two draft picks.

They are all part of the youngest Knicks team since 1979-80. Knicks star Kristaps Porzingis remains out as he recovers from ACL surgery, and it remains unclear when he’ll return.

In the meantime, the Knicks are trying to rebuild with a young core, while keeping an eye on free agency next summer when Kevin Durant, Jimmy Butler and New Jersey native Kyrie Irving hit the open market.

“They’ve done a great job of making me feel like I’m welcome here,” Trier said. “They treat me like I’m one of their picks. They say they’re very excited about the future and having me right now.

“They’re looking forward to changing this culture and turning this into something really special.”

Still, Trier is in a unique position because, per his two-way contract, he can only spend a maximum of 45 days with the Knicks, while the remainder will be spent with their G League club, the Westchester Knicks.

“With the 45 days, we’re going to really try to squeeze it the best we can,” Fizdale said of Trier. “I’m leaving that to (President) Steve (Mills) and (GM) Scott (Perry) and (Director of Player Personnel) Craig Robinson, to figure out for me. I can’t even think about that right now.”

Said Trier: “We’ve had some talks about it and it’s something that I’m sure we’ll figure out soon. That’s all I can really say. It’s kind of between management and me and my agent and stuff like that.”

In the meantime, Trier hopes to help the Knicks win and maybe even make the “SportsCenter” Top 10 a few more times.

“That was a good one,” he said of the dunk. “Being in the Garden made it better.”

Adam Zagoria is a New York-based freelancer. Follow him on Twitter @AdamZagoria.