private static bool Prefix(IngameMenuManager __instance) { if (settings.toggleInstantPartyChange) { var startChangedPartyOnGlobalMap = __instance.GetType().GetMethod("StartChangedPartyOnGlobalMap", BindingFlags.NonPublic | BindingFlags.Instance); startChangedPartyOnGlobalMap.Invoke(__instance, new object[] { }); return(false); } return(true); }
//Singleton private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Debug.Log("Instance already exists, destroying object."); Destroy(this); } }