|Topic was automatically imported from the old Question2Answer platform.
I’m making a multiplayer game.
When i change current scene to another scene, client disconnected from server.
My scene is quite heavy so it takes a long time to load and disconnects during that time
Does someone have a solution for this?
First clarify a couple things.
Is your connection information tied to the scene you’re changing away from?
Is it the main scene you’re changing?
When doing long tasks its advised to start it on another
threadas the main one is mostly used for display related events. That said can the loading of your new scene be done in parts?
Wakatta | 2021-09-01 21:50
I don’t know what to say but I am creating a lobby then when enough players it will start the game and switch from the current scene to the “map” scene
deathgm | 2021-09-02 10:06
My point exactly let’s say you have this setup
class_name Lobby extends Control
var peer = NetworkedMultiplayerENet.new()
get_tree().network_peer = peer
What do you suppose happens to the
peer var once the scene is changed?
It gets freed that’s what
Wakatta | 2021-09-02 10:58