public static void ComponentReflection(ModelElement mod, object obj) { var r = ObjectFelds(obj); ModelManagerUI.LoadToGameR(mod, r, ""); ReflectionModel[] all = r.All; for (int i = 0; i < all.Length; i++) { all[i].field.SetValue(obj, all[i].Value); } }