private void AutoloadUgBgStyle(Type type) { ModUgBgStyle ugBgStyle = (ModUgBgStyle)Activator.CreateInstance(type); ugBgStyle.mod = this; string name = type.Name; if (ugBgStyle.Autoload(ref name)) { AddUgBgStyle(name, ugBgStyle); } }