diff --git a/addons/pandora/model/entity.gd b/addons/pandora/model/entity.gd index 3f2b6b0..9b2d434 100644 --- a/addons/pandora/model/entity.gd +++ b/addons/pandora/model/entity.gd @@ -526,7 +526,14 @@ func get_resource(property_name: String) -> Resource: if not has_entity_property(property_name): push_warning("unknown resource property %s on entity %s" % [property_name, get_entity_id()]) return null - return get_entity_property(property_name).get_default_value() as Resource + # HACK: For some reason in Godot 4.3, resource properties are + # are considered Strings on exported builds with GDScript mode set to binary tokens. + # Here, instead of returning the default value and casting it to Resource, + # we check its type and we handle it accordingly. + var default_value = get_entity_property(property_name).get_default_value() + if default_value is not Resource: + return load(default_value) + return default_value func get_array(property_name: String) -> Array: