Type 2 diabetes usually comes on more slowly, as the body becomes resistant to insulin or the pancreas can't produce enough of it. Genetics play a role in both types. Exposure to viruses and other environmental effects may be a factor in type 1. Lifestyle factors, including weight gain and physical inactivity, are strongly linked to type 2..