fix: "Cyclic references are not supported as you just discovered" 🫠🔫

This commit is contained in:
2025-12-04 11:20:51 -05:00
Unverified
parent aa4619dc20
commit 5904d9710d
4 changed files with 15 additions and 17 deletions

View File

@@ -5,14 +5,14 @@ public partial class ConnectButtonUI : Button
{
[Export] public TextEdit AddressUi;
[Export] public Label ErrorLabel;
[Export] public PackedScene NextScene;
private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.tscn";
public override void _Pressed()
{
if (Connection.Instance.Connect(AddressUi.Text))
{
GD.Print("Success!");
GetTree().ChangeSceneToPacked(NextScene);
GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH);
}
else
{