Gets the classes defined in this image.
()
| 11619 | } |
| 11620 | /** Gets the classes defined in this image. */ |
| 11621 | get classes() { |
| 11622 | if (Il2Cpp.unityVersionIsBelow201830) { |
| 11623 | const types = this.assembly.object.method("GetTypes").invoke(false); |
| 11624 | // On Unity 5.3.8f1, getting System.Reflection.Emit.OpCodes type name |
| 11625 | // without iterating all the classes first somehow blows things up at |
| 11626 | // app startup, hence the `Array.from`. |
| 11627 | return Array.from(types).map(e => new Il2Cpp.Class(Il2Cpp.Api._classFromSystemType(e))); |
| 11628 | } |
| 11629 | else { |
| 11630 | return Array.from(Array(this.classCount), (_, i) => new Il2Cpp.Class(Il2Cpp.Api._imageGetClass(this, i))); |
| 11631 | } |
| 11632 | } |
| 11633 | /** Gets the name of this image. */ |
| 11634 | get name() { |
| 11635 | return Il2Cpp.Api._imageGetName(this).readUtf8String(); |
nothing calls this directly
no test coverage detected