Godot Version
v4.4.1.stable.steam [49a5bc7b6]

Question
After export multiplayer level switching stopped working, game just crushes but in Editor all works perfectly fine both with Steam and local simulation. I tried to use ResourcePreloader for levels(they not really big) but it did not helped.
I use SteamMultiplayerPeer and GodotSteam extensions.
Level switching done with use of MultiplayerSpawner. Switching done when 2 players enter area at the end of level.

func _on_body_entered(body: Node3D) -> void:
	if body is Player:
		Player_counter += 1
		Player_list.append(body)
	if Player_counter >= 2 or (Global.Debug_mode == true and Player_counter >=1):
		for host in Player_list:
			if host.name =="1":
				$"../..".on_level_complete()

After it calls parent node(always same path)

func on_level_complete():
	if multiplayer.get_unique_id() != 1:
		Global.Shooting_time = false
		return
	var first_step = get_parent()#Go to level in main_menu
	var second_step = first_step.get_parent()#Go to root of main_menu
	second_step.next_level(load(Next_level))#Next_level is PackedScene that assigned in editor with @export
	self.queue_free()

And main_menu hendels level switching

func next_level(data):
	$Levels.add_child(data.instantiate())

Again in Editor all hendels without any break downs but after export works 0% of the times.
Also I use a looby scene that always loads before any other level and form it players spawn to real level. It works literally the same way but is able to switch level to chosen from main menu somehow…

  • stanlatt likes this.
  • So turns out that there where no porblem with netcode at all. The real problem is DirAccess to folder with pictures in project becouse it may be working in Editor it won't work after export so you need to assign path manualy. Or in theory you could add and reffer to folder near your exported project. Still weird that it do not throw any error messages in terminal.

how do you run the game after export?

Can you try to run it via terminal? maybe it will spew out some information what happened?

    kuligs2 tried both trough exe file and with terminal, no error messege is accured when crush is happening also maybe woth to notice, looks like "crash" happens only on host side meanwhile client stil can run around some time.

    So turns out that there where no porblem with netcode at all. The real problem is DirAccess to folder with pictures in project becouse it may be working in Editor it won't work after export so you need to assign path manualy. Or in theory you could add and reffer to folder near your exported project. Still weird that it do not throw any error messages in terminal.