A car dealership in Perth's south-east will need its entire roof replaced after a naked man allegedly trespassed on the property.

The 24-year-old is accused of breaking into the property through John Hughes Hyundai's air-conditioning unit just before 11pm on Friday.

The man climbed on to the roof but it collapsed under him and he fell through the panels.

St John Ambulance paramedics took the man to hospital.

He has since been charged with a number of offences.