Just trying to get started
See original GitHub issueThere’s probably some step I’m just not aware of, but I would love a pointer if anyone can spot my mistake. I’m running on a windows EC2 for testing, with 27015 and 27016 open in the security groups, the test.exe allowed free movement in the windows firewall settings. I’m getting the client and the server to connect, but I can’t seem to get a list of servers to show up, nor ping for a server in Steam -> View -> Servers -> Favorites -> Add a server -> Find servers at this address.
The test project code is as follows:
`using Steamworks; using Steamworks.Data; using Steamworks.ServerList; using System.Threading.Tasks; using UnityEngine;
public class SteamServerManager : MonoBehaviour {
async void Start() {
DontDestroyOnLoad(gameObject);
try {
SteamClient.Init(myAppId);
}
catch (System.Exception e) {
Debug.Log(e);
Debug.Log("SteamClient Init Failed");
return;
}
Debug.Log("SteamClient connected");
SteamServerInit serverInit = new SteamServerInit("", "MyGame") {
GamePort = 27015,
Secure = true,
QueryPort = 27016
};
try {
SteamServer.Init(myAppId, serverInit);
}
catch (System.Exception e) {
Debug.Log(e);
Debug.Log("SteamServer Init Failed");
SteamClient.Shutdown();
return;
}
Debug.Log("SteamServer connected");
await GetServerList();
}
void Update() {
}
async Task GetServerList() {
Debug.Log("Waiting 5s before updating");
await Task.Delay(5000);
Internet list = new Internet();
await list.RunQueryAsync();
foreach (ServerInfo server in list.Responsive) {
Debug.Log("Server list response: " + server.Address + ", " + server.Name);
}
Debug.Log("Server Refresh Complete");
}
void OnDisable () {
SteamClient.Shutdown();
SteamServer.Shutdown();
}
}`
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Just Getting Started (2017)
An ex-F.B.I. Agent (Tommy Lee Jones) and an ex-mob lawyer in the Witness Protection Program (Morgan Freeman) have to put aside their petty...
Read more >Why Getting Started is More Important Than Succeeding
It's doesn't matter what you're working towards, the most important thing is to get started. Read this article to find out why (and...
Read more >How to Start Doing a Thing When You Really, Really Don't ...
Just take the time to break the thing down into smaller things. You'll be surprised how much easier it is to get started...
Read more >Jason Aldean - Just Gettin' Started (Lyric Video) - YouTube
... Get tickets to see Jason Aldean in concert: https ... Try That In A Small Town - Jason Aldean (lyrics). Musical journey•17K ......
Read more >How to Be a Minimalist: A Guide For Getting Started with ...
Are you wondering how to be a minimalist? If you're just getting started with minimalism and feeling overwhelmed, these tips will help!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I met a guy in a Discord, shared his code with my from version 0.7:
And this reports properly from the web api:
And shows up and responds on my favorite list, but still doesn’t show up on the master list. Very much progress though! I should mention this server was connected to by a dozen people without problems. Still not on the internet server list though…
So I was looking at the Steamworks Dedicated Server settings and it says “Product name (also called mod dir or game dir)”… well in the Steamworks.NET examples it says to leave mod dir to “” unless you’re your running a “mod” not the base game… Changing my ModDir = “MyGame” and now it’s properly populating to the master server list =3
Thank you to everyone that offered suggestions.