public static void Postfix(GameSettingMenu __instance) { var mapNameTransform = __instance.AllItems.FirstOrDefault(x => x.gameObject.activeSelf && x.name.Equals("MapName", StringComparison.OrdinalIgnoreCase)); if (mapNameTransform == null) { return; } var options = new Il2CppSystem.Collections.Generic.List <Il2CppSystem.Collections.Generic.KeyValuePair <string, int> >(); for (int i = 0; i < GameOptionsData.MapNames.Length; i++) { var kvp = new Il2CppSystem.Collections.Generic.KeyValuePair <string, int>(); kvp.key = GameOptionsData.MapNames[i]; kvp.value = i; options.Add(kvp); } mapNameTransform.GetComponent <KeyValueOption>().Values = options; }
public static void Prefix(GameSettingMenu __instance) { __instance.HideForOnline = new Transform[] {}; }
static void Prefix(ref GameSettingMenu __instance) { __instance.HideForOnline = new Il2CppReferenceArray <Transform>(0); }
public static void Prefix(GameSettingMenu __instance) { // Unlocks map/impostor amount changing in online (for testing on your custom servers) __instance.HideForOnline = new Il2CppReferenceArray <Transform>(0); }