Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit c88182c

Browse files
committed
Bump version
1 parent 02e0102 commit c88182c

File tree

5 files changed

+14
-18
lines changed

5 files changed

+14
-18
lines changed
Binary file not shown.
0 Bytes
Binary file not shown.

src/ExplorerCore.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace UnityExplorer
1414
public static class ExplorerCore
1515
{
1616
public const string NAME = "UnityExplorer";
17-
public const string VERSION = "4.7.13";
17+
public const string VERSION = "4.8.0";
1818
public const string AUTHOR = "Sinai";
1919
public const string GUID = "com.sinai.unityexplorer";
2020

src/Hooks/HookInstance.cs

+11-15
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public class HookInstance
1515
{
1616
// Static
1717

18-
//static readonly StringBuilder evalOutput = new();
1918
static readonly StringBuilder evaluatorOutput;
2019
static readonly ScriptEvaluator scriptEvaluator = new(new StringWriter(evaluatorOutput = new StringBuilder()));
2120

@@ -31,21 +30,22 @@ static HookInstance()
3130
// Instance
3231

3332
public bool Enabled;
33+
3434
public MethodInfo TargetMethod;
3535
public string PatchSourceCode;
3636

37-
private readonly string shortSignature;
38-
private PatchProcessor patchProcessor;
37+
readonly string signature;
38+
PatchProcessor patchProcessor;
3939

40-
private MethodInfo postfix;
41-
private MethodInfo prefix;
42-
private MethodInfo finalizer;
43-
private MethodInfo transpiler;
40+
MethodInfo postfix;
41+
MethodInfo prefix;
42+
MethodInfo finalizer;
43+
MethodInfo transpiler;
4444

4545
public HookInstance(MethodInfo targetMethod)
4646
{
4747
this.TargetMethod = targetMethod;
48-
this.shortSignature = TargetMethod.FullDescription();
48+
this.signature = TargetMethod.FullDescription();
4949

5050
GenerateDefaultPatchSourceCode(targetMethod);
5151

@@ -144,7 +144,7 @@ private string GenerateDefaultPatchSourceCode(MethodInfo targetMethod)
144144
{
145145
StringBuilder codeBuilder = new();
146146

147-
codeBuilder.Append("static void Postfix("); // System.Reflection.MethodBase __originalMethod
147+
codeBuilder.Append("static void Postfix(");
148148

149149
bool isStatic = targetMethod.IsStatic;
150150

@@ -175,7 +175,7 @@ private string GenerateDefaultPatchSourceCode(MethodInfo targetMethod)
175175
codeBuilder.AppendLine(" try {");
176176
codeBuilder.AppendLine(" StringBuilder sb = new StringBuilder();");
177177
codeBuilder.AppendLine($" sb.AppendLine(\"--------------------\");");
178-
codeBuilder.AppendLine($" sb.AppendLine(\"{shortSignature}\");");
178+
codeBuilder.AppendLine($" sb.AppendLine(\"{signature}\");");
179179

180180
if (!targetMethod.IsStatic)
181181
codeBuilder.AppendLine($" sb.Append(\"- __instance: \").AppendLine(__instance.ToString());");
@@ -207,15 +207,11 @@ private string GenerateDefaultPatchSourceCode(MethodInfo targetMethod)
207207
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.Log(sb.ToString());");
208208
codeBuilder.AppendLine(" }");
209209
codeBuilder.AppendLine(" catch (System.Exception ex) {");
210-
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {shortSignature}:\\n{{ex}}\");");
210+
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {signature}:\\n{{ex}}\");");
211211
codeBuilder.AppendLine(" }");
212212

213-
// End patch body
214-
215213
codeBuilder.AppendLine("}");
216214

217-
//ExplorerCore.Log(codeBuilder.ToString());
218-
219215
return PatchSourceCode = codeBuilder.ToString();
220216
}
221217

src/UnityExplorer.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@
7979
<!-- il2cpp nuget -->
8080
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
8181
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" />
82-
<PackageReference Include="UniverseLib.IL2CPP" Version="1.4.0" />
82+
<PackageReference Include="UniverseLib.IL2CPP" Version="1.4.1" />
8383
</ItemGroup>
8484
<!-- mono nuget -->
8585
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
86-
<PackageReference Include="UniverseLib.Mono" Version="1.4.0" />
86+
<PackageReference Include="UniverseLib.Mono" Version="1.4.1" />
8787
</ItemGroup>
8888

8989
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->

0 commit comments

Comments
 (0)