LAS VEGAS — Jacob Wiley couldn’t have seen this coming.

Not six years ago, when he was a confused, hurting teen who had just found his alcoholic father dead.

Not three years ago, when he was scrubbing dishes in a retirement home to make ends meet.

Heck, not even less than a year ago, when he arrived at Eastern Washington with no scholarship and no guarantees.

Back then, pro basketball wasn’t even a dream. But here is Wiley, an undrafted 6-foot-8, 213-pound forward, playing in the Las Vegas Summer League and fighting for a spot with the Nets. He is one of just two Nets invitees with partial guarantees, and the only one with a coveted two-way deal.

“I didn’t see it coming until it hit me. I couldn’t imagine this even six months ago. It’s just been a blessing,’’ Wiley, 22, told The Post.

“Where Jake was headed in the ninth grade, with the lack of parental influence, it’s a credit to him where he is as compared to where most people are headed who had the same influences,” former Eastern Washington coach Jim Hayford told The Post. “Isn’t it a great story?”

It is hard to believe any of the hundreds of players at summer league have a better one.

Wiley was born in Long Beach, Calif., to Sheree Gilkey and Jeff Wiley, a black mother and a white father.

Wiley has said his father never physically abused him. He looked up to his father and started inheriting his laissez–faire attitude towards school, his grades dropping to the point that he was ruled ineligible for sports.

When his father moved away from California, Jacob, then 14, decided to go with him to Newport, Wash., a tiny town on the Idaho border, an hour south of Canada.

“Even though it was an extreme decision based on his behavior and his habits, I just knew I needed to do that,’’ Wiley said.

“I wouldn’t be standing here talking to you doing this if I didn’t make that decision. … So even though there was drama associated and it was hard and there was a lot of growing and maturing I had to do living with him, it made me a better person.”

The pair lived in an attic Wiley estimates was the size of a hotel room and didn’t have heat in the winter. Jeff, drinking heavily, attempted suicide. Then, on Feb. 5, 2011, Wiley found him dead in the next room, food stuffed in his mouth and down his throat.

Wiley steadied himself enough to earn a scholarship to Montana, but overwhelmed with college life and Division I basketball, he fell out of love with the sport. In 2012-13, he logged just 60 minutes all season, scoring a total of 19 points.

“My mind was scattered. Lost is the best word to describe how I felt with just life in general. I was just lost,’’ Wiley said. “I didn’t know what I was doing. Many kids my age were that way, but mine was a little extreme.”

So was Wiley’s life to that point. By way of honoring Jeff, he tried the other sports his late father had always wanted him to attempt. On a whim he joined the track team and ran a 47.5-second 400 meters. When fall practice started, he lasted just a day and quit to play football. But he hurt his knee in practice and got his scholarship pulled, having to take out loans and eventually take a $7-per-hour job cooking and washing dishes at a retirement home.

“I just fell out of love with the game,’’ Wiley said. “I was just young and immature. Instead of sticking with it and trying to make other things work alongside it, I just said, ‘I’m going to just move on and try other things.’ ”

He spent six months trying them, from October until late March of his sophomore year — until March Madness rekindled that love for basketball. He started getting up at 5 a.m., and getting into the school’s rec center, practicing, training. Working.

Eventually, he called coach Brandon Rinta at NAIA Lewis-Clark State in Lewiston, Idaho. A backup at the start of the season, he was honorable mention All-American by the end. By then, his longtime girlfriend, Brittany Hopkins, was pregnant.

Wiley, working at a gas station and on a Native American reservation for extra cash, became a father Jan. 10, 2016. And he vowed he wouldn’t make the same mistakes with little Aliya Wiley that his own father had made with him.

A focused Wiley made first-team NAIA All-American, then transferred to nearby Eastern Washington to study for his master’s degree. Oh, and to keep playing.

Wiley showed up at Eastern Washington without a scholarship, but quickly earned one on a preseason tour to Australia.

“He just plays so hard. He goes for every rebound, he’ll contest every shot and just plays at a size bigger than he is,” said Hayford, who now coaches at Seattle. “He rebounds like [Dennis] Rodman. … You wish everybody played the game that hard.

“He’s like 2017 Gomer Pyle: Yes sir, no sir, I’ll work hard sir.”

Wiley worked so hard he would arrive at 6 a.m. for 7:30 a.m. practices. He worked hard enough to average 20.4 points, 9.1 boards and 2.8 blocks while shooting 64.2 percent.

Wiley and Brittany were married April 8, just before he impressed scouts at the Portsmouth Invitational Tournament in Virginia with his 7-foot wingspan, 37 ½-inch vertical and elite athleticism.

“It’s true, it’s authentic, he’s grateful, he’s hard-working,’’ Hayford said. “If anyone can make it, it’s Jake. And if anyone should make it, it’s Jake.”

He snatched nine rebounds in 15 minutes Thursday in an 85-74 Nets win over the Nuggets, with a plus-eight that was second-best on the team. The league quarterfinal Saturday against the Lakers gave Wiley another chance to impress.

“Upside, athleticism, versatility. He doesn’t have a ton of experience, but … he’s got a motor obviously,’’ Nets coach Kenny Atkinson told The Post. “He’s a little fast and wild right now, but we see the athletic potential, the length, the speed, how hard he plays.

“He’s like a young colt running and we’re going to have to try to [coach him]. There’s a lot of development there to be done. But that’s how we look at those guys. You’re not getting a finished NBA product. It’s just not that easy.”

But it isn’t that hard compared to what Wiley already has been through.