SAN FRANCISCO >> As soon as most of the NBA became trade-eligible on Sunday, the Warriors put their name on top of the transaction log by trading De’Anthony Melton, Reece Beekman and three second-round picks to the Nets for guard Dennis Schroder.

The deal came as the Warriors had lost seven of their last nine games and their offense, particularly late in games, tanked.

They couldn’t afford to wait.

“It’s huge,” Warriors general manager Mike Dunleavy said on the timing of the trade. “It’s hard to get deals done in this league, period. But this early in the season is tough. You need two motivated parties. I think we had that with us and Brooklyn. Just evaluating the team, and this loss of De’Anthony was huge. To be able to shore that up and remedy that to some degree is really important. It felt like something that couldn’t wait until February.”

The Warriors view Schroder as a player who can play both with and without the ball, alongside Steph Curry or running bench-unit offenses. A pick-and-roll player, Schroder represents the team’s willingness to adapt their long-held offensive approach.

Head coach Steve Kerr is “thrilled” with the move. Draymond Green and Steph Curry gave Dunleavy the double thumbs-up when he looped them into discussions, and also publicly approved the move after Sunday’s loss to the Mavericks. The general manager, speaking with reporters on a conference call Monday morning, said Schroder is a “much-needed addition” to sure up their backcourt after Melton’s season-ending injury.

That doesn’t mean it’ll be the only move the Warriors look to make.

“We’re always aggressive,” Dunleavy said. “You’ve got to be mindful with what you’re giving up, what you’re getting back, all those things. But anything we can do to make the team better, we’re going to do. We’re in a time zone here of maximizing our window with Steph and Draymond and Steve as our coach.”

The Warriors added Schroder without parting with any of their best trade assets — their future first-round picks, Jonathan Kuminga and Brandin Podziemski. Although using Melton’s salary in the deal comes with some opportunity cost, the Warriors can technically flip Schroder later in the year if they need to stack salaries for a star player.

Schroder is averaging 18.4 points and a career-high 6.6 assists per game. A pesky defender, he’s expected to fill the void of two-way players that has been left by Melton’s injury and Podziemski’s ongoing sophomore slump.

Like Chris Paul last season, Schroder should provide a new engine as a pick-and-roll playmaker, counterbalancing Golden State’s read-and-react movement system that has gotten bogged down as defenses load up on Curry.

“I don’t think he was necessarily brought here to fit,” Green said. “We play a certain style of basketball that he does not really play. And I don’t think the goal is to get him to play the style of basketball we play. We need someone who does the things that he does. I’m looking forward to us adjusting to him.”

The Warriors are tied for fifth in the NBA in defensive rating, sliding slightly after the Mavericks ripped them apart on Sunday night. If their current skid continues even after Schroder joins the fold — he’ll likely debut Thursday in Memphis — Dunleavy will almost certainly have to pick up the phone again.

“For the most part, I feel good about this team, particularly on the defensive end,” Dunleavy said. “Now we’ve got a player who we think can generate more offense for us. I want to evaluate and see, but we’ll always be looking at stuff.”