Foam insulation in unvented attics helps transform the space into a liveable area. Check with your local code official if this construction approach is accepted and what requirements apply. Foam insulation in unvented attics can help:
keep bulk moisture out (closed-cell spray foam is a water-resistive barrier)
allow the roof sheathing to dry towards the inside (with open-cell spray foam)
protect against condensation, mould growth and mildew
maintain even temperatures throughout the attic space
Keep in mind that in an occupied space, mechanical ventilation is recommended to maintain the required number of air changes and good indoor air quality.