Skip to content

Commit 9546650

Browse files
committed
Fix reloading mapping all wrappers to the last index
1 parent d7c74d6 commit 9546650

File tree

1 file changed

+5
-1
lines changed
  • kt/godot-library/godot-core-library/src/main/kotlin/godot/runtime

1 file changed

+5
-1
lines changed

kt/godot-library/godot-core-library/src/main/kotlin/godot/runtime/Bootstrap.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import java.util.*
1313

1414
internal class Bootstrap {
1515
private lateinit var serviceLoader: ServiceLoader<Entry>
16+
private var engineTypeInitialized = false
1617

1718

1819
fun initJar(loader: ClassLoader) {
@@ -70,7 +71,10 @@ internal class Bootstrap {
7071
with(entry) {
7172
if (isMainEntry) {
7273
mainContext = context
73-
context.initEngineTypes()
74+
if(!engineTypeInitialized) {
75+
context.initEngineTypes()
76+
engineTypeInitialized = true
77+
}
7478
registerManagedEngineTypes(
7579
TypeManager.engineTypeNames.toTypedArray(),
7680
TypeManager.engineSingletonsNames.toTypedArray()

0 commit comments

Comments
 (0)