MCPcopy Create free account
hub / github.com/axhlzy/FridaDebugger / tryAsArray

Function tryAsArray

agent/unity-fields.ts:205–220  ·  view source on GitHub ↗
(object: Il2Cpp.Object)

Source from the content-addressed store, hash-verified

203}
204
205function tryAsArray(object: Il2Cpp.Object): Il2Cpp.Array | null {
206 try {
207 const klass = object.class;
208 const className = getClassName(klass);
209 if (!className.endsWith("[]") && klass.rank <= 0) {
210 return null;
211 }
212
213 const array = new Il2Cpp.Array(object.handle);
214 void array.length;
215 void array.elementType;
216 return array;
217 } catch (_error) {
218 return null;
219 }
220}
221
222function logArray(array: Il2Cpp.Array): void {
223 const length = array.length;

Callers 1

logIl2CppFieldsFunction · 0.85

Calls 1

getClassNameFunction · 0.85

Tested by

no test coverage detected