/// <summary> /// This method must be called before doing anything else. /// </summary> /// <returns>True if initialized successfully.</returns> public static bool Initialize(int appId = -1) { // Write app id to file if set. if (appId > 0) { var currentLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); File.WriteAllText(Path.Combine(currentLocation, "steam_appid.txt"), $"{appId}", Encoding.ASCII); } // Initialize native library. return(SteamAPIInterop.SteamAPI_Init()); }
public static void Uninitialize() { SteamAPIInterop.SteamAPI_Shutdown(); }
public static void UnregisterCallback(IntPtr pCallback) { SteamAPIInterop.SteamAPI_UnregisterCallback(pCallback); }
public static void RegisterCallback(IntPtr pCallback, int iCallback) { SteamAPIInterop.SteamAPI_RegisterCallback(pCallback, iCallback); }
public static void RunCallbacks() { SteamAPIInterop.SteamAPI_RunCallbacks(); }
public static void RestartAppIfNecessary(uint appId) { SteamAPIInterop.SteamAPI_RestartAppIfNecessary(appId); }