LauraWebdev / GodotSteam_CSharpBindings

GodotSteam C# Bindings
MIT License
49 stars 6 forks source link

lobby_created signal won't fire #29

Closed AmyGilhespy closed 11 months ago

AmyGilhespy commented 11 months ago

I can't get the lobby_created signal to fire no matter what I do. What am I missing?

SteamInit();
// ...
Steam.LobbyCreated += OnLobbyCreated;
//Steam.Instance.Connect("lobby_created", Callable.From<long, long>(OnLobbyCreated));
//Connect("lobby_created", Callable.From<long, long>(OnLobbyCreated));
// ...
CreateLobby(Steam.LobbyType.FriendsOnly, 8L);
private static void OnLobbyCreated(long connect, long lobbyID)
{
    GD.Print("OnLobbyCreated("+connect+", "+lobbyID+")"); // This never gets printed
}
public static void CreateLobby(Steam.LobbyType lobbyType, long maxMembers)
{
    GD.Print("Creating Steam lobby..."); // This gets called
    Steam.CreateLobby(lobbyType, maxMembers);
    GD.Print("Sent Steam lobby creation request."); // So does this
}

Steam is initializing successfully and I have an app ID for my project (and I'm using it).

Other APIs such as grabbing an avatar work as expected.

AmyGilhespy commented 11 months ago

I figured it out! You just have to call RunCallbacks().