Top NBA draft prospect Markelle Fultz attends a game between...

Top NBA draft prospect Markelle Fultz attends a game between the New York Knicks and the Toronto Raptors at Madison Square Garden on Sunday, April 9, 2017, at Madison Square Garden. Credit: Jim McIsaac

The Knicks had an interested onlooker sitting courtside at the Garden for their next-to-last game Sunday, one they wouldn’t mind having on their team next season.

University of Washington point guard Markelle Fultz, the projected No. 1 pick in the June draft, sat in the front row and watched the Knicks lose to the Raptors, 110-97.

Fultz has been making the rounds lately. He attended games involving the 76ers and Wizards last week. Fultz, who is from the D.C. area, said he came to see how the Knicks play and believes he could fit in the triangle offense.

“I think I could play in any system,” he said. “I’m very versatile, so it was cool to see that. It’s a lot of openings and stuff like that, so that’s why I came to see that in person.

“Just to see the way they play. Just whatever they do offensively. That happens to be the triangle, so I was watching the way they went through it and stuff like that.”

The Knicks (30-51), who surpassed last season’s loss total, would need to get lucky and win next month’s draft lottery or at least jump into the top two for a chance at Fultz or UCLA’s Lonzo Ball.

The Knicks, owners of the sixth-worst record in the league, could use a point guard. Derrick Rose will be a free agent and is coming off a fourth knee surgery. Undrafted rookie Ron Baker, who had 11 points, eight rebounds and eight assists Sunday, also will be a free agent, although the Knicks want him back. But Fultz wouldn’t mind calling the Garden home.

“It would be amazing,” he said. “It’s close to home. My family can come out and this is the greatest place to play, really, in New York, big stadium, a lot of good fans.”

Another point guard also watched the game. Former Knick Stephon Marbury sat almost directly across from Fultz at the other end of the court. Marbury received a nice ovation when he was shown on the Jumbotron.

The Knicks will close out this disappointing season Wednesday night against the 76ers in what could be the last game of Carmelo Anthony’s Knicks career.

Anthony didn’t play Sunday because of what the Knicks called a sore left knee. He has missed six of their last 10 games. The Knicks are expected to try to trade him this offseason.

Kristaps Porzingis (sore lower back) sat for the fourth straight game and might not play Wednesday night.

The Knicks played well for three quarters and led by as much as 11 points but then fell apart. The Raptors brought a 76-75 lead into the fourth quarter and extended that lead to 18 points.

DeMar DeRozan led Toronto (50-31) with 35 points and shot 11-for-15 from the field. He was 13-for-15 from the foul line, matching the Knicks’ total free-throw attempts. Raptors guard Kyle Lowry added 17 points.

Knicks rookie Willy Hernangomez matched his career high with 24 points and added 11 rebounds.

“I just tried to play hard,” he said. “I’m happy because I tied my scoring high today. But it would be better if we got the win.”