You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valentityConfigType=entityConfigField["__value"]?.let { it asString } ?: error("Entity config field '__value' is null for entity '$entityName' in chunk '$chunkName'!")
valentityBlueprintType=entityBlueprintField["__value"]?.let { it asString } ?: error("Entity blueprint field '__value' is null for entity '$entityName' in chunk '$chunkName'!")
399
399
400
400
val chunkEntity = mutableMapOf<String, Any>()
401
401
chunkEntities.add(chunkEntity)
402
-
chunkEntity["type"] =entityConfigType
402
+
chunkEntity["type"] =entityBlueprintType
403
403
chunkEntity["name"] = gameObjectName
404
404
405
405
// Add position of entity = (chunk position in the level) + (position within the chunk) + (pivot point)
@@ -421,15 +421,15 @@ class AssetLevelMapExporter(
421
421
// Add all other fields of entity
422
422
ldtkEntities.forEach { field ->
423
423
val fieldName = field["__identifier"] asString
424
-
if (fieldName !="entityConfig") {
424
+
if (fieldName !="entityBlueprint") {
425
425
chunkEntity[fieldName] = field["__value"] ?: error("Entity field '__value' is null for field '$fieldName' in entity '$entityName' of chunk '$chunkName'!")
426
426
}
427
427
}
428
428
// Add entity to list of game objects which are spawned automatically by the WorldChunkSystem
429
429
if ((ldtkEntity["__tags"] asList<String>).firstOrNull { it =="gameobject" } !=null) {
430
430
chunkSpawnEntities.add(gameObjectName)
431
431
}
432
-
} elseprintln("ERROR: Game object with name '${entityName}' has no field 'entityConfig'!")
432
+
} elseprintln("ERROR: Game object with name '${entityName}' has no field 'entityBlueprint'!")
0 commit comments