Recruiters of New York City’s best high school basketball players have long gone to the toughest corners of the five boroughs — housing projects and violent playgrounds, and households of desperation and inspiration both.

The recruitment of Marquis Barnett has brought some of them to his place of residence on the Lower East Side. Barnett, a 6-foot-7, 240-pound high school senior, lives there in a cluttered apartment with a steel gate and security guards outside — as well as a 10 p.m. curfew, set not by his mother but by the City of New York.

The building is a homeless shelter, the fourth one that Barnett, his mother and two younger siblings have lived in over the last two and half years.

“This is not the right way to be living,” Barnett said after racing back to the apartment one recent night to make curfew. “But I guess it is just another hurdle in our lives.”