public void InitServer() { HSteamUser hSteamUser = SteamGameServer.GetHSteamUser(); this.Self = SteamInternal.FindOrCreateGameServerInterface(hSteamUser, this.InterfaceName); if (this.Self == IntPtr.Zero) { throw new Exception(String.Concat("Couldn't find server interface ", this.InterfaceName)); } this.VTable = Marshal.ReadIntPtr(this.Self, 0); if (this.Self == IntPtr.Zero) { throw new Exception(String.Concat("Invalid VTable for server ", this.InterfaceName)); } this.InitInternals(); SteamServer.WatchInterface(this); }
public void InitServer() { var user = SteamGameServer.GetHSteamUser(); Self = SteamInternal.FindOrCreateGameServerInterface(user, InterfaceName); if (Self == IntPtr.Zero) { throw new System.Exception($"Couldn't find server interface {InterfaceName}"); } VTable = Marshal.ReadIntPtr(Self, 0); if (Self == IntPtr.Zero) { throw new System.Exception($"Invalid VTable for server {InterfaceName}"); } InitInternals(); SteamServer.WatchInterface(this); }