static void Prefix(HomeSystem __instance) { var bookViewBack = HomeSystem.instance.bookHolder.parent.gameObject; if (bookViewBack.GetComponent <NewBookView>() == null) { bookView = bookViewBack.AddComponent <NewBookView>(); } if (!hasInit) { hasInit = true; bookView.Init(); } // HomeSystem.instance.bookHolder.parent.parent.gameObject.SetActive(false); }
static void Prefix(HomeSystem __instance) { if (!Main.Enabled) { return; } var bookViewBack = BuildingWindow.instance.bookHolder.parent.gameObject; if (bookViewBack.GetComponent <NewBookView>() == null) { bookView = bookViewBack.AddComponent <NewBookView>(); } if (!hasInit) { hasInit = true; bookView.Init(); } // HomeSystem.instance.bookHolder.parent.parent.gameObject.SetActive(false); }