private static void SetPage(int pageNum, SceneLoadScene sceneLoadScene = null) { if (sceneLoadScene != null) { try { sceneLoadScene.GetType().GetMethod("SetPage", AccessTools.all) ?.Invoke(sceneLoadScene, new object[] { pageNum }); return; } catch { // fall through } } SceneLoadScenePageSetter.Value(pageNum); }
private IEnumerator SetPageCoroutine(string scenePath) { if (!_setPage) { yield break; } _setPage = false; yield return(null); var page = NormalizedScenePaths.IndexOf(scenePath) / ImagesPerPage; if (page < 0) { yield break; } _sceneLoadScene?.GetType().GetField("page", AccessTools.all)?.SetValue(null, page); }