@internal
(klass, lengthOrElements)
| 10830 | class 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); |
no test coverage detected