` I prepared a separate client and server with ENetConnection and ENetPacketPeer. When client is connected to server ,server able to send all peers a packet to notify yes a new player connected me so everypeer should spawn at own machine. I dont want to use High Level Multiplayer api and my basic code like this.
"""
This code works each time at client side but i cant able to see on godot editor each time
"""
func packet_handler(packet_var):
if packet_var[0] =="spawn":
for i in packet_var[2]: # get a dictionary contain all user information
var PlayerRef = load("res://Scenes/player.tscn").instantiate()
PlayerRef.name = str(packet_var[1])
MY_ID =str( packet_var[1])
game.get_child(4).add_child(PlayerRef) #to ensure that under Game scene
There is a problem due to godot edıtor or my code .
The remote scene view isn’t terribly useful with multiple instances. Try running multiple editors or the editor and an exported game instance and try to figure out what conditions this problem occurs. Once you know which instance (i.e. server, client, second client??) has the issue try to follow the spawn code step by step to avoid missing the problems.
Okay i will try your suggestion to execute also clients from different editors. Due to i am making my custom stuff,i also not able to use network profiler and debugging become really hard
Okay i am writing my solution actualy codes works but somehow client couldnt achieve its own create function correctly. I created a global buffer(Array type) and whenever server send me packet for spawn i added there then put a 0.5 second each request to ensure spawn function executed correctly. After that i just use my global connection MY_ID to control my own player and its camera function.