This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace UnityExplorer
17
17
public class ExplorerCore
18
18
{
19
19
public const string NAME = "UnityExplorer" ;
20
- public const string VERSION = "3.1.7 " ;
20
+ public const string VERSION = "3.1.8 " ;
21
21
public const string AUTHOR = "Sinai" ;
22
22
public const string GUID = "com.sinai.unityexplorer" ;
23
23
Original file line number Diff line number Diff line change @@ -101,8 +101,24 @@ public static Type GetMonoType(CppType cppType)
101
101
return Il2CppToMonoType [ cppType ] ;
102
102
103
103
var getType = Type . GetType ( cppType . AssemblyQualifiedName ) ;
104
- Il2CppToMonoType . Add ( cppType , getType ) ;
105
- return getType ;
104
+
105
+ if ( getType != null )
106
+ {
107
+ Il2CppToMonoType . Add ( cppType , getType ) ;
108
+ return getType ;
109
+ }
110
+ else
111
+ {
112
+ string baseName = cppType . FullName ;
113
+ string baseAssembly = cppType . Assembly . GetName ( ) . name ;
114
+
115
+ Type unhollowedType = AppDomain . CurrentDomain . GetAssemblies ( ) . FirstOrDefault ( a => a . GetName ( ) . Name == baseAssembly ) ? . GetTypes ( ) . FirstOrDefault ( t =>
116
+ t . CustomAttributes . Any ( ca =>
117
+ ca . AttributeType . Name == "ObfuscatedNameAttribute" && ( string ) ca . ConstructorArguments [ 0 ] . Value == baseName ) ) ;
118
+
119
+ Il2CppToMonoType . Add ( cppType , unhollowedType ) ;
120
+ return unhollowedType ;
121
+ }
106
122
}
107
123
108
124
private static readonly Dictionary < Type , IntPtr > CppClassPointers = new Dictionary < Type , IntPtr > ( ) ;
You can’t perform that action at this time.
0 commit comments