mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-15 07:56:41 +08:00
Update to UniverseLib 1.2, cleanups
This commit is contained in:
@ -2,21 +2,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using BF = System.Reflection.BindingFlags;
|
||||
using System.Text;
|
||||
using UnhollowerBaseLib;
|
||||
using UnhollowerRuntimeLib;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace UnityExplorer.Runtime
|
||||
{
|
||||
public class Il2CppProvider : RuntimeHelper
|
||||
public class Il2CppHelper : UERuntimeHelper
|
||||
{
|
||||
public override void SetupEvents()
|
||||
{
|
||||
@ -41,7 +31,7 @@ namespace UnityExplorer.Runtime
|
||||
// These methods currently cause a crash in most il2cpp games,
|
||||
// even from doing "GetParameters()" on the MemberInfo.
|
||||
// Blacklisting until the issue is fixed in Unhollower.
|
||||
public static HashSet<string> defaultIl2CppBlacklist = new HashSet<string>
|
||||
public static HashSet<string> defaultIl2CppBlacklist = new()
|
||||
{
|
||||
// These were deprecated a long time ago, still show up in some IL2CPP games for some reason
|
||||
"UnityEngine.MonoBehaviour.allowPrefabModeInPlayMode",
|
@ -1,20 +1,10 @@
|
||||
#if MONO
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer;
|
||||
|
||||
namespace UnityExplorer.Runtime
|
||||
{
|
||||
public class MonoProvider : RuntimeHelper
|
||||
public class MonoHelper : UERuntimeHelper
|
||||
{
|
||||
public override void SetupEvents()
|
||||
{
|
@ -13,16 +13,18 @@ using UniverseLib;
|
||||
|
||||
namespace UnityExplorer.Runtime
|
||||
{
|
||||
public abstract class RuntimeHelper
|
||||
// Not really that necessary anymore, can eventually just be refactored away into the few classes that use this class.
|
||||
|
||||
public abstract class UERuntimeHelper
|
||||
{
|
||||
public static RuntimeHelper Instance;
|
||||
public static UERuntimeHelper Instance;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
#if CPP
|
||||
Instance = new Il2CppProvider();
|
||||
Instance = new Il2CppHelper();
|
||||
#else
|
||||
Instance = new MonoProvider();
|
||||
Instance = new MonoHelper();
|
||||
#endif
|
||||
Instance.SetupEvents();
|
||||
|
||||
@ -35,9 +37,7 @@ namespace UnityExplorer.Runtime
|
||||
|
||||
public abstract void SetupEvents();
|
||||
|
||||
#region Reflection Blacklist
|
||||
|
||||
private static readonly HashSet<string> currentBlacklist = new HashSet<string>();
|
||||
private static readonly HashSet<string> currentBlacklist = new();
|
||||
|
||||
public virtual string[] DefaultReflectionBlacklist => new string[0];
|
||||
|
||||
@ -88,7 +88,5 @@ namespace UnityExplorer.Runtime
|
||||
|
||||
return currentBlacklist.Contains(sig);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user