SANTA CLARA, Calif. - Sean McVay and Kyle Shanahan took similar paths on their journey to becoming NFL coaches.

Both rose from famous football families to their first NFL jobs as quality control assistants on Jon Gruden’s staffs in Tampa Bay and then spent four years together on Kyle’s father Mike’s staff in Washington.

Now McVay and Shanahan are both first-time head coaches ready to face off as opponents Thursday night when McVay’s Los Angeles Rams (1-1) face Shanahan’s San Francisco 49ers (0-2).

“Once I got around Kyle, it takes you about two minutes to realize what a bright offensive mind he is,” McVay said.

“The next couple of years we just really continued to grow in our friendship and I learned a lot from him. … He’s one of the guys I respect as much as anyone in this business and he’s been a huge influence on my coaching career.”

McVay, the grandson of former 49ers executive John McVay, capitalized on the four years as an assistant for Washington when Kyle Shanahan was offensive coordinator to take over that job when Jay Gruden replaced Mike Shanahan as head coach and Kyle left for Cleveland.

A successful tenure there helped the 31-year-old McVay become the youngest head coach in modern NFL history when the Rams hired him this offseason. None of that came as a surprise to Shanahan.

“You never know until you get put in that spot, but usually when you get hired, you’re capable of doing it,” Shanahan said. “You don’t know until you get on the job. And regardless of what your age is, you know, Sean’s been a coordinator, he’s been through it, he’s been around football a lot.

First-year 49ers head coach Kyle Shanahan and Rams first-year head coach Sean McVay took similar paths on their journey to becoming NFL coaches. Their teams meet Thursday night at San Francisco.(Photo: AP FILE)

“Whether he got this opportunity now, which he did, or eight years from now, Sean is going to adjust to the situation and rise to the challenge and I think he’ll do a great job there.”

Niners receiver Pierre Garcon knows both coaches well, having played for them in Washington and now with Shanahan in San Francisco. He said they are both passionate about football and run similar offenses, but there are some differences off the field.

“Sean might be a little bit smoother and funnier,” Garcon said. “Kyle is on top of all the details. That’s a little bit of difference.”

Here are some other things to watch:

FAVORITE FOE

Ever since beating Chicago on Dec. 6, 2015, the 49ers have been unable to beat any other team — except for the Rams. San Francisco won the season finale that year against the Rams and then swept Los Angeles last season. Over a 22-game span, the Niners are 3-0 against the Rams and 0-19 against everyone else.

“We’re done with that. We’re on to this year,” Rams quarterback Jared Goff said. “Last year was a whole different deal and this year is exciting.”

FAMILY AFFAIR

McVay has a family connection to the 49ers through his grandfather. John McVay spent more than two decades in the front office in San Francisco and was a key part of the dynasty that brought five Super Bowl titles to the franchise. Sean McVay hopes to get a chance to see his grandfather before the game.

“I want to ask him who he’ll be rooting for,” he said. “I’d like to think that family runs a little thicker, but you have to ask him that.”

SEARCH FOR SIX

The 49ers have had 21 drives this season and are still waiting for their first touchdown . San Francisco has 11 punts, four field goals, three turnovers and three failed fourth-down attempts so far. The biggest culprit has been quarterback Brian Hoyer, who is averaging just 4.7 yards per attempt thanks in part to just two completions on throws that traveled more than 10 yards downfield.

“You’ve just got to get completions and move the chains,” he said. “’I think that’s the one thing we’ve got to do as an entire offense is stay on the field longer. Our defense is doing a great job. Keep them off the field. Keep them fresh. For us it would be great to just go out and sustain a drive.”

GOFF GROWS

Goff looks like a completely different quarterback than the one who struggled as a rookie late last season against the 49ers. Goff went 11 for 24 for 90 yards in a 22-21 loss on Christmas Eve as part of a 0-7 rookie season. Goff got his first win in the opener against Indianapolis and has thrown for 265 yards per game, up from 155.6 as a rookie.

SAFETY DANCE

The 49ers have been hit with the injury bug at safety. Strong safety Eric Reid will miss at least a couple of games with an injured left knee, free safety Jimmie Ward is still working his way back from a training camp hamstring injury and hasn’t played a complete game, and backup Jaquiski Tartt has been slowed this week by a neck injury. The only fully healthy safeties on the roster are a pair of rookies in seventh-rounder Adrian Colbert and undrafted Lorenzo Jerome.