Allocates a new object of the current class and calls its default constructor.
()
| 11130 | } |
| 11131 | /** Allocates a new object of the current class and calls its default constructor. */ |
| 11132 | new() { |
| 11133 | const object = this.alloc(); |
| 11134 | const exceptionArray = Memory.alloc(Process.pointerSize); |
| 11135 | Il2Cpp.Api._objectInit(object, exceptionArray); |
| 11136 | const exception = exceptionArray.readPointer(); |
| 11137 | if (!exception.isNull()) { |
| 11138 | (0, console_1.raise)(new Il2Cpp.Object(exception).toString()); |
| 11139 | } |
| 11140 | return object; |
| 11141 | } |
| 11142 | /** Gets the field with the given name. */ |
| 11143 | tryField(name) { |
| 11144 | const handle = Il2Cpp.Api._classGetFieldFromName(this, Memory.allocUtf8String(name)); |
nothing calls this directly
no test coverage detected