BOSTON — On the first possession of the Knicks’ final dress rehearsal before the start of the regular season, Kristaps Porzingis tried to assert himself against the Celtics’ David Lee and missed badly on a leaning hook. Porzingis spent the next four minutes collecting three fouls and soon planted his 7-foot-3 frame on the visitors’ bench.

The preseason schedule was a mixed bag for the Knicks, who were not at their best Thursday in a 99-85 loss to the Celtics at TD Garden.

The Knicks — scheduled to open the regular season Wednesday against the Milwaukee Bucks — trailed by as many as 19 points in the first half as Porzingis labored with foul trouble and Carmelo Anthony struggled with his shot.

Arron Afflalo, who missed much of the preseason with a left hamstring injury, went to the locker room Thursday with what the team described as hamstring tightness. Losing Afflalo, a shooting guard, for any length of time would be an early blow to the Knicks, who figure to lean on his experience. Coach Derek Fisher said he wanted to exercise caution.