The couple split up last December after almost four years together.
In an interview with Shape magazine, Hudgens says the reason they broke up was due to the demands of their busy work schedules and filming at different locations around the world.
'Long-distance relationships are hard no matter what,' the 22-year-old actress tells the magazine.
'When you don't have face-to-face time, it's just different. Having an iPhone helped, but it wasn't the same.'
But Hudgens says she is still good friends with her former High School Musical co-star.
The pair's real-life romance blossomed on the set of the Disney film series, in which their characters, Troy Bolton and Gabriella Montez, were sweethearts.
'We grew up together, she says. 'It was nice to have someone to share all those experiences with… It was a good thing.”
She adds: 'The relationship kept me grounded and because I was with someone who knew me so well, I didn't need to try to be someone that I'm not.'
But the Sucker Punch star hasn't given up on love, saying: 'I hope by the time I'm 30 to have a husband and maybe a baby. I love children. They're so much fun, and I would have a blast spoiling them.'