(value: NativePointer)
| 150 | } |
| 151 | |
| 152 | export function createIl2CppObject(value: NativePointer): Il2Cpp.Object | null { |
| 153 | if (!isUnityIl2CppProcess() || !isObjectCandidate(value) || !ensureAttached()) { |
| 154 | return null; |
| 155 | } |
| 156 | |
| 157 | try { |
| 158 | const object = new Il2Cpp.Object(value); |
| 159 | void object.class; |
| 160 | return object; |
| 161 | } catch (_error) { |
| 162 | return null; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | export function rememberIl2CppClass(klass: Il2Cpp.Class): void { |
| 167 | knownClassHandles.add(klass.handle.toString()); |
no test coverage detected