MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / from

Method from

Il2cppHook/_Ufunc.js:10832–10839  ·  view source on GitHub ↗

@internal

(klass, lengthOrElements)

Source from the content-addressed store, hash-verified

10830class Il2CppArray extends native_struct_1.NativeStruct {
10831 /** @internal */
10832 static from(klass, lengthOrElements) {
10833 const length = typeof lengthOrElements == "number" ? lengthOrElements : lengthOrElements.length;
10834 const array = new Il2Cpp.Array(Il2Cpp.Api._arrayNew(klass, length));
10835 if (Array.isArray(lengthOrElements)) {
10836 array.elements.write(lengthOrElements);
10837 }
10838 return array;
10839 }
10840 /** @internal Gets a pointer to the first element of the current array. */
10841 get elements() {
10842 return new Il2Cpp.Pointer(Il2Cpp.Api._arrayGetElements(this), this.elementType);

Callers 15

ctor_2Method · 0.45
printLOGFunction · 0.45
cModuleMethod · 0.45
objectMethod · 0.45
fieldsMethod · 0.45
interfacesMethod · 0.45
methodsMethod · 0.45
nestedClassesMethod · 0.45
inflateMethod · 0.45
classesMethod · 0.45
classesMethod · 0.45
parametersMethod · 0.45

Calls 2

_arrayNewMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected