California is the clearest state in the country on this, and the answer splits three ways. First, the ADU statute itself names factory-built housing: Government Code 66313(a) defines an accessory dwelling unit and then says it 'also includes the following: (1) An efficiency unit. (2) A manufactured home, as defined in Section 18007 of the Health and Safety Code.' Section 18007 is the federal HUD-code manufactured home definition, so a HUD-certified manufactured home is an ADU by statute and a city cannot rule out the whole category. Second, there is building code preemption for a modular (factory-built) home. Under the Factory-Built Housing Law, Health and Safety Code 19960 and following, HCD-certified third-party agencies review the plans and the plant, and every unit sold to a first user in California must carry an HCD insignia of approval (H&SC 19980). A local enforcement agency enforces and inspects only the installation of the unit (H&SC 19992), and where the ordinary State Housing Law in Part 1.5 conflicts with the Factory-Built Housing Law on factory-built housing, the Factory-Built Housing Law controls (H&SC 19990(c)). Third, there is HUD-code zoning parity outside the ADU context: Government Code 65852.3 makes a city allow a HUD-certified manufactured home on a foundation system on any lot zoned for a conventional single-family home, apply only the same development standards it applies to a site-built home, restrict only roof overhang, roofing material and siding material, and it bars any standard that has the effect of precluding manufactured homes as permanent residences.