mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-22 17:47:35 +08:00
Bump version
This commit is contained in:
parent
02e0102041
commit
c88182c831
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ namespace UnityExplorer
|
||||
public static class ExplorerCore
|
||||
{
|
||||
public const string NAME = "UnityExplorer";
|
||||
public const string VERSION = "4.7.13";
|
||||
public const string VERSION = "4.8.0";
|
||||
public const string AUTHOR = "Sinai";
|
||||
public const string GUID = "com.sinai.unityexplorer";
|
||||
|
||||
|
@ -15,7 +15,6 @@ namespace UnityExplorer.Hooks
|
||||
{
|
||||
// Static
|
||||
|
||||
//static readonly StringBuilder evalOutput = new();
|
||||
static readonly StringBuilder evaluatorOutput;
|
||||
static readonly ScriptEvaluator scriptEvaluator = new(new StringWriter(evaluatorOutput = new StringBuilder()));
|
||||
|
||||
@ -31,21 +30,22 @@ namespace UnityExplorer.Hooks
|
||||
// Instance
|
||||
|
||||
public bool Enabled;
|
||||
|
||||
public MethodInfo TargetMethod;
|
||||
public string PatchSourceCode;
|
||||
|
||||
private readonly string shortSignature;
|
||||
private PatchProcessor patchProcessor;
|
||||
readonly string signature;
|
||||
PatchProcessor patchProcessor;
|
||||
|
||||
private MethodInfo postfix;
|
||||
private MethodInfo prefix;
|
||||
private MethodInfo finalizer;
|
||||
private MethodInfo transpiler;
|
||||
MethodInfo postfix;
|
||||
MethodInfo prefix;
|
||||
MethodInfo finalizer;
|
||||
MethodInfo transpiler;
|
||||
|
||||
public HookInstance(MethodInfo targetMethod)
|
||||
{
|
||||
this.TargetMethod = targetMethod;
|
||||
this.shortSignature = TargetMethod.FullDescription();
|
||||
this.signature = TargetMethod.FullDescription();
|
||||
|
||||
GenerateDefaultPatchSourceCode(targetMethod);
|
||||
|
||||
@ -144,7 +144,7 @@ namespace UnityExplorer.Hooks
|
||||
{
|
||||
StringBuilder codeBuilder = new();
|
||||
|
||||
codeBuilder.Append("static void Postfix("); // System.Reflection.MethodBase __originalMethod
|
||||
codeBuilder.Append("static void Postfix(");
|
||||
|
||||
bool isStatic = targetMethod.IsStatic;
|
||||
|
||||
@ -175,7 +175,7 @@ namespace UnityExplorer.Hooks
|
||||
codeBuilder.AppendLine(" try {");
|
||||
codeBuilder.AppendLine(" StringBuilder sb = new StringBuilder();");
|
||||
codeBuilder.AppendLine($" sb.AppendLine(\"--------------------\");");
|
||||
codeBuilder.AppendLine($" sb.AppendLine(\"{shortSignature}\");");
|
||||
codeBuilder.AppendLine($" sb.AppendLine(\"{signature}\");");
|
||||
|
||||
if (!targetMethod.IsStatic)
|
||||
codeBuilder.AppendLine($" sb.Append(\"- __instance: \").AppendLine(__instance.ToString());");
|
||||
@ -207,15 +207,11 @@ namespace UnityExplorer.Hooks
|
||||
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.Log(sb.ToString());");
|
||||
codeBuilder.AppendLine(" }");
|
||||
codeBuilder.AppendLine(" catch (System.Exception ex) {");
|
||||
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {shortSignature}:\\n{{ex}}\");");
|
||||
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {signature}:\\n{{ex}}\");");
|
||||
codeBuilder.AppendLine(" }");
|
||||
|
||||
// End patch body
|
||||
|
||||
codeBuilder.AppendLine("}");
|
||||
|
||||
//ExplorerCore.Log(codeBuilder.ToString());
|
||||
|
||||
return PatchSourceCode = codeBuilder.ToString();
|
||||
}
|
||||
|
||||
|
@ -79,11 +79,11 @@
|
||||
<!-- il2cpp nuget -->
|
||||
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
|
||||
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" />
|
||||
<PackageReference Include="UniverseLib.IL2CPP" Version="1.4.0" />
|
||||
<PackageReference Include="UniverseLib.IL2CPP" Version="1.4.1" />
|
||||
</ItemGroup>
|
||||
<!-- mono nuget -->
|
||||
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
|
||||
<PackageReference Include="UniverseLib.Mono" Version="1.4.0" />
|
||||
<PackageReference Include="UniverseLib.Mono" Version="1.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
|
||||
|
Loading…
Reference in New Issue
Block a user