Prince William was participating in a group discussion with a gay youth organization in London when he was asked about how he would react if one of his children came out to him as gay.

The Duke of Cambridge, who was visiting the Albert Kennedy Trust nonprofit group, said it would "obviously absolutely fine by me," according to The Associated Press.

"Do you know what? I've been giving that some thought recently because a couple of other parents said that to me, as well," William said, according to People. "I think, you really don't start thinking about that until you are a parent, and I think — obviously, absolutely fine by me."

The royal and his wife, Kate Middleton, are parents to Prince George, 5; Princess Charlotte, 4; and Prince Louis, 1. William said his concern would be outside pressures.

“The one thing I’d be worried about is how they, particularly the roles my children fill, is how that is going to be interpreted and seen,” he said. “So, Catherine and I have been doing a lot of talking about it to make sure they were prepared.”

William said the microscope his family is under in the public eye contributes to his worry.

"I wish we lived in a world where it's really normal and cool, but particularly for my family, and the position that we are in, that's the bit I am nervous about," he said, according to the BBC. "How many barriers, you know, hateful words, persecution, all that and discrimination that might come -- that's the bit that really troubles me. But that's for all of us to try and help correct and make sure we can put that to the past and not come back to that sort of stuff."

Formed in 1989, the Albert Kennedy Trust serves lesbian, gay, bisexual and transgender youth who are homeless, living in a hostile environment or in a housing crisis. William's appearance makes him the first member of the royal family to visit an LGBTQ+ youth charity, the organization said.

People reported that William has shown public support of the LGBTQ community before, including when he posed for the cover of Attitude magazine in 2016. He made history as the first royal to do so.