Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
622 changes: 622 additions & 0 deletions RuntimeUnityEditor.Bepin5/PatchInspector/IL.cs

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions RuntimeUnityEditor.Bepin5/PatchInspector/ILViewMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace RuntimeUnityEditor.Bepin5.PatchInspector
{
internal enum ILViewMode
{
Original,
PatchMethods
}
}
34 changes: 34 additions & 0 deletions RuntimeUnityEditor.Bepin5/PatchInspector/ILViewerWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;

namespace RuntimeUnityEditor.Bepin5.PatchInspector
{
internal class ILViewerWindow
{
public int WindowId;
public Rect WindowRect;
public MethodBase Method;
public string OriginalIL;
public List<PatchMethodInfo> PatchMethods;
public Vector2 ScrollPosition;
public Vector2 PatchListScrollPosition;
public bool IsOpen;
public ILViewMode CurrentView;
public int SelectedPatchIndex;

public ILViewerWindow(int windowId, MethodBase method, string originalIL, List<PatchMethodInfo> patchMethods)
{
WindowId = windowId;
Method = method;
OriginalIL = originalIL;
PatchMethods = patchMethods;
WindowRect = new Rect(100 + (windowId % 5) * 50, 100 + (windowId % 5) * 50, 900, 650);
ScrollPosition = Vector2.zero;
PatchListScrollPosition = Vector2.zero;
IsOpen = true;
CurrentView = ILViewMode.Original;
SelectedPatchIndex = -1;
}
}
}
16 changes: 16 additions & 0 deletions RuntimeUnityEditor.Bepin5/PatchInspector/PatchInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Reflection;

namespace RuntimeUnityEditor.Bepin5.PatchInspector
{
internal struct PatchInfo
{
public string MethodName;
public string TargetType;
public string PatcherAssembly;
public string PatcherNamespace;
public string PatchType;
public string FilePath;
public MethodBase TargetMethod;
public bool IsEnabled;
}
}
Loading