Changed variables from static, building game EXTREMELY slow

So since learning proper use for static variables, I converted them all to normal variables.

So at beginning of the script I’ll state

var scriptName : Name; //(set in inspector)

and then just reference it with scriptName.Variable (instead of static, where I could just Name.Variable)

However, once I converted all of these the build time went from 3 seconds to 10 minutes. The game plays fine in the inspector and once it’s actually built. Does anyone know what’s actually slowing it, and if there’s a way to correct this?

For other people having this problem, the issue is having them be global variables. If instead, you change them all to:

private var scriptName : Name;

and set in the Awake() of the script, it’ll run swimmingly.