Set start parameter to PackedScene.

Post any engine-related development questions or issues you are having to receive advice, support, or help.
Post Reply
SweetIce
Posts: 7
Joined: Wed Jul 19, 2023 1:36 pm

I feel its an old problem of godot : https://github.com/godotengine/godot-pr ... ssues/1513

I need to send information for a scene to indicate spawner locations , ammount , etc

Code: Select all

var p:PackedScene = load( "res://Scenes/scene.tscn" )
var scene = p.instantiate()
scene.add_player( isMe , playerName , nodeId ) 
get_tree().change_scene_to_packed(p)
The func add_player is called, but when the scene loads it overwide any data in the scene and delete the information.
I saw everywhere, I mean, everybody using singletons to make this works, sorry, singleton is not a solution for me, is there a way to send information to the scene or this is just one more problem godot have and if I want to use it I need to use singletons ???
Post Reply