Meghan Markle, who is set to marry Prince Harry on May 19, spent her formative years in the Los Angeles neighbourhood of Hollywood, a more working class place than its famous name suggests.

It was home to the progressive primary school and Catholic high school where the American actress starred in musicals and got her first lessons in the social activism she says will now be her life’s primary purpose.

And it was home to a far more unlikely place for a future royal to be raised – the television studio where she spent after-school hours with her cinematographer father on the set of the sitcom Married… With Children.

Those who doted on the show’s shaggy dog have no trouble remembering her even decades later.

Melba Farquhar, whose husband, Ralph, was a supervising producer on Married… With Children, made a habit of bringing dinner leftovers to Buck, a Briard who became a canine star.

Before one Friday night recording of the show she noticed a girl of about 10 watching her with quiet fascination.

“This little girl, and it was Meghan, was so interested, she asked me, ‘Are you saving your food for the dog?’,” Melba Farquhar told the Associated Press.

On a subsequent Friday, the young girl showed up with her own leftovers.

“She had saved some of her dinner to give to him, and wanted to know that it was OK if she fed the dog this time,” Ms Farquhar said. “She was just so sweet.”

“And now,” Ms Farhquar said in disbelief, “she’s going to be in the royal family.”

Most who recall the young girl expressed similar shock that she is now marrying Prince Harry, but said she is more than prepared for the gravity of her new role, and could transform what it means to be a member of the royal family.

“My thought, truly, was ‘he is so lucky. He has no idea’,” said Maria Pollia, a favourite high school teacher of Ms Markle’s.

“When you think about the circles that Prince Harry is in, and when you think about the many, many accomplished women that he has known all his life, there is something that I know about Meghan, which is her genuineness, her compassion, her depth, is something that I’m not sure that all of those women share.”

Ms Markle’s father, Thomas Markle, is retired and has been living in Mexico. Her mother, Doria Ragland, is a social worker who still lives in Los Angeles.

Neither has spoken publicly since the engagement was announced, part of a media silence that has also included Ms Markle’s close friends and most of her cast mates on the TV legal drama Suits, which aired her final episode last month.

Ms Markle’s parents will meet the Queen prior to the wedding and will have a special role in the ceremony.

They divorced when she was six, but jointly raised her, and she spent many hours with her father at Sunset Gower Studios, about a mile from each of her schools, where he oversaw the lighting and camera crew for much of the 1987-to-1997 run of Married… With Children, a span that saw his daughter grow from five to 15.

The set was a warm and family-friendly place, crew members said. The lowbrow show itself often was not, revelling in trashiness and toilet humour that made it “a really funny and perverse place for a little girl in a Catholic school uniform to grow up,” Ms Markle told Esquire magazine in 2013.

And for Ms Markle, a lifelong dog devotee whose beagle and Labrador mix were the stars of her now-deleted Instagram account, it had the added bonus of Buck.

“Tommy used to bring her on the set a lot, and of course she was always hanging around and petting Buck,” said Steven Ritt, the dog’s owner and trainer, who recently gave an interview with a wolfish black pup named Ariel at his feet. “A lot of kids gravitated towards Buck.”

Mr Ritt said Ms Markle’s gentle manner made her a natural with animals.

“Meghan was always kind of an old soul, even as a child, a little more mature than some of the children around the set at her age,” he said.

Old soul or not, she was still a schoolgirl, and when Thomas Markle had to shoot scenes with scantily-clad women and sex jokes, which was often, he wanted her out of sight.

“There were a lot of times my dad would say, ‘Meg, why don’t you go and help with the craft services room over there? This is just a little off-colour for your 11-year-old eyes’,” Ms Markle told Esquire.

“Just picture me with my curly hair and a gap in my teeth and my little school uniform with Keds on, looking up like, ‘Hi’, at these very, uh, provocative women. It was a big change from Immaculate Heart Catholic School.”

Memories of Ms Markle run deep at the all-girls school, which has a tiny chapel at its centre and sits on a hillside below the American Film Institute.

“She was one of those girls that, you’re drawn to her,” said Christine Knudsen head of Immaculate Heart’s theology department, who noticed Ms Markle as an actress on the school stage before getting to know her as a student and leader on school retreats. “For whatever reason she has that special spark.”

The school is hosting a tea to celebrate the marriage, along with a viewing party of the wedding that despite a 4am California start time is expected to draw a big crowd.

In plays like the musical Into the Woods, often lit by her father who would volunteer, Ms Markle would use the stage in the Immaculate Heart gym to develop the acting skills that would land her a role on Suits, joining fellow Immaculate Heart alums-turned-TV-stars Mary Tyler Moore and Tyra Banks.

The school emphasised a Catholic ethic of service and social justice, seeking to turn each student into a “woman of great heart and right conscience” – a phrase her former teachers said Ms Markle embodied, though like many of her classmates she was not Catholic.

Ms Pollia pushed Ms Markle to overcome an initial timidity and volunteer at a Skid Row soup kitchen, which Ms Markle would do for most of her last two years of school.

In interviews nearly 20 years later she shared the advice that Ms Pollia had given her: “Put the needs of others above your own fears.”

ms Markle’s conscience had a head start before she got to Immaculate Heart.

While a student at the nearby Hollywood Schoolhouse, she objected to a dish soap commercial that included a line that leapt out as sexist even to her 11-year-old self: “Mothers around America are fighting greasy pots and pans.”

Ms Markle mounted a letter-writing campaign that got her featured on a Nickelodeon kids’ news show.

“I was wondering if you would be able to change your commercial to ‘people all over America’,” she wrote in a letter to Procter & Gamble, which did in fact change the ad’s language.

“She always had a sense of confidence and poise, and instead of complaining about something, let’s think about what we might be able to do to change it,” Ms Knudsen said.

“I see a lot of Princess Diana in her… I think she has the ability to really speak to what’s important to her heart, and I think she will.”

Ms Markle’s love of dogs may also serve her well in her royal role. It already has, at least in her intimidating first meeting with the Queen at Buckingham Palace.

“The corgis took to you right away,” Prince Harry said, looking at a laughing Ms Markle during a joint interview in November.

“For the last 33 years, I’ve been barked at,” he said, then gestured to his fiancee. “This one walks in, absolutely nothing. Just wagging tails.”

“Just laying down on my feet during tea,” Ms Markle said.