Can disable automatic RunCallback calling by setting asyncCallbacks to false in Init

This commit is contained in:
Garry Newman 2019-08-17 11:40:52 +01:00
parent 71b977ef7e
commit a7666d7d51
2 changed files with 11 additions and 2 deletions

View File

@ -11,7 +11,11 @@ namespace Steamworks
{
static bool initialized;
public static void Init( uint appid )
/// <summary>
/// Initialize the steam client.
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
/// </summary>
public static void Init( uint appid, bool asyncCallbacks = true )
{
System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() );
System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() );

View File

@ -66,7 +66,12 @@ namespace Steamworks
/// </summary>
public static event Action<Result> OnSteamServersDisconnected;
public static void Init( AppId appid, SteamServerInit init )
/// <summary>
/// Initialize the steam server.
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
/// </summary>
public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = true )
{
uint ipaddress = 0; // Any Port