From 97dffc81e138a4952761a368799cd4d1cad0c08c Mon Sep 17 00:00:00 2001 From: Sinai <49360850+sinai-dev@users.noreply.github.com> Date: Thu, 19 May 2022 00:07:12 +1000 Subject: [PATCH] Fix patch target on Time.timeScale --- src/ExplorerCore.cs | 2 +- src/UI/Widgets/TimeScaleWidget.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index 7577fa7..05a802a 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -14,7 +14,7 @@ namespace UnityExplorer public static class ExplorerCore { public const string NAME = "UnityExplorer"; - public const string VERSION = "4.8.1"; + public const string VERSION = "4.8.2"; public const string AUTHOR = "Sinai"; public const string GUID = "com.sinai.unityexplorer"; diff --git a/src/UI/Widgets/TimeScaleWidget.cs b/src/UI/Widgets/TimeScaleWidget.cs index 1bd2808..1ed8d4e 100644 --- a/src/UI/Widgets/TimeScaleWidget.cs +++ b/src/UI/Widgets/TimeScaleWidget.cs @@ -97,7 +97,7 @@ namespace UnityExplorer.UI.Widgets try { - MethodInfo target = AccessTools.Method(typeof(Time), nameof(Time.timeScale)); + MethodInfo target = typeof(Time).GetProperty("timeScale").GetSetMethod(); #if CPP if (UnhollowerBaseLib.UnhollowerUtils.GetIl2CppMethodInfoPointerFieldForGeneratedMethod(target) == null) return;