-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullReferenceException D:/a/Facepunch.Steamworks/Facepunch.Steamworks/Facepunch.Steamworks/SteamNetworkingSockets.cs:105 #768
Comments
Ahh, I see the new way to startup a server is below. So, it looks like this is just wiki documentation issue. var serverInit = new SteamServerInit( "gmod", "Garry Mode" ) try |
However, I am still experiencing an issue with trying to get the server list from the client. My core issue is that either (1) The SteamServer is not properly listing or advertising itself or (2) The SteamClient is not correctly querying the server list. So, effectively, my server cannot be discovered. Here is some more information about my setup. Maybe this will help troubleshoot the issue?
ZCPServer.cs`using System; public class ZCPServer : MonoBehaviour
} ZCPClient.cs`using UnityEngine; public class ZCPClient : MonoBehaviour
} |
Have you set your "Product name" in Steamworks app config in the dedicated server section to your appId? Thats what did the trick for me. |
Thanks for the reply Fobri - yes, I have that set, and I seem to be able to login with the server as anonymous now. The server seems to be up and running, and it seems to be advertising itself. However, when the client requests a server list, nothing is returned. Basically, my server is undiscoverable. |
Describe the bug
I have searched for this error in both open and closed issues, and did not find it.
I am on Unity 2021.3.37f1. I am receiving the NullReferenceException in title after following the installation instructions exactly. I have /Assets/Plugins/Facepunch.Steamworks/ and under there is the contents of the "Unity" folder from the archive (it has the redistibutable_bin folder and the Facepunch.Steamworks.Win64.dll along with the other platform DLLs).
To Reproduce
Steps to reproduce the behavior:
Create the "MyServer.cs" exactly as shown in the example on https://wiki.facepunch.com/steamworks/Creating_A_Socket_Server (Code for this is shown below)
Create "MyServerManager.cs" as a Monobehaviour that can be attached as a component to an empty object in the scene hierarchy. (Code for this is shown below).
Attach MyServerManager.cs to an empty game object in the scene hierarchy.
Click Run
See error:
NullReferenceException: Object reference not set to an instance of an object
Steamworks.SteamNetworkingSockets.CreateNormalSocket[T] (Steamworks.Data.NetAddress address) (at D:/a/Facepunch.Steamworks/Facepunch.Steamworks/Facepunch.Steamworks/SteamNetworkingSockets.cs:105)
MyServerManager.Start () (at Assets/Scripts/Steam/MyServerManager.cs:11)
Calling Code
Expected behavior
I do not expect to receive a NullReferenceException
Desktop (please complete the following information):
Additional context
When I double-click on the NullReferenceException in the console, it attempts to open D:/a/Facepunch.Steamworks/Facepunch.Steamworks/Facepunch.Steamworks/SteamNetworkingSockets.cs. which, of course, it cannot do because I am not the developer of this plugin :)
Things I have Tried to Resolve Issue
The text was updated successfully, but these errors were encountered: