Skip to content

Commit 3cf97dd

Browse files
committed
Add error handling to asset promise for weapons
1 parent 8446e62 commit 3cf97dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mirror-godot-app/player/equipable/equipable_controller.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ func _load_equipable_by_asset_id(asset_id: String) -> void:
154154
if asset_id != _current_asset_id:
155155
# It is possible that another call to this method changed the current equipable.
156156
return
157+
if file_promise.is_error():
158+
push_error("Failed to download asset: ", file_promise.get_error_message())
159+
equipable_changed.emit(null)
157160
var file_result = file_promise.get_result()
158161
if file_result is Node3D and file_result.has_meta(&"MIRROR_equipable"):
159162
_setup_equipped_item(file_result)

0 commit comments

Comments
 (0)