(object: Il2Cpp.Object)
| 203 | } |
| 204 | |
| 205 | function 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 | |
| 222 | function logArray(array: Il2Cpp.Array): void { |
| 223 | const length = array.length; |
no test coverage detected