public static void Shutdown()
 {
     Event.DisposeAllClient();
     SteamClient.initialized = false;
     SteamClient.ShutdownInterfaces();
     SteamApps.Shutdown();
     SteamUtils.Shutdown();
     SteamParental.Shutdown();
     SteamMusic.Shutdown();
     SteamVideo.Shutdown();
     SteamUser.Shutdown();
     SteamFriends.Shutdown();
     SteamScreenshots.Shutdown();
     SteamUserStats.Shutdown();
     SteamInventory.Shutdown();
     SteamNetworking.Shutdown();
     SteamMatchmaking.Shutdown();
     SteamParties.Shutdown();
     SteamNetworkingUtils.Shutdown();
     SteamNetworkingSockets.Shutdown();
     Base.Shutdown();
     SteamAPI.Shutdown();
 }
        public static void Init(uint appid)
        {
            if (IntPtr.Size != 8)
            {
                throw new System.Exception("Only 64bit processes are currently supported");
            }

            System.Environment.SetEnvironmentVariable("SteamAppId", appid.ToString());
            System.Environment.SetEnvironmentVariable("SteamGameId", appid.ToString());

            if (!SteamAPI.Init())
            {
                throw new System.Exception("SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId.");
            }

            AppId = appid;

            initialized = true;


            SteamApps.InstallEvents();
            SteamUtils.InstallEvents();
            SteamParental.InstallEvents();
            SteamMusic.InstallEvents();
            SteamVideo.InstallEvents();
            SteamUser.InstallEvents();
            SteamFriends.InstallEvents();
            SteamScreenshots.InstallEvents();
            SteamUserStats.InstallEvents();
            SteamInventory.InstallEvents();
            SteamNetworking.InstallEvents();
            SteamMatchmaking.InstallEvents();
            SteamParties.InstallEvents();
            SteamNetworkingSockets.InstallEvents();

            RunCallbacksAsync();
        }
Exemple #3
0
        /// <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());

            if (!SteamAPI.Init())
            {
                throw new System.Exception("SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId.");
            }

            AppId = appid;

            initialized = true;

            SteamApps.InstallEvents();
            SteamUtils.InstallEvents();
            SteamParental.InstallEvents();
            SteamMusic.InstallEvents();
            SteamVideo.InstallEvents();
            SteamUser.InstallEvents();
            SteamFriends.InstallEvents();
            SteamScreenshots.InstallEvents();
            SteamUserStats.InstallEvents();
            SteamInventory.InstallEvents();
            SteamNetworking.InstallEvents();
            SteamMatchmaking.InstallEvents();
            SteamParties.InstallEvents();
            SteamNetworkingSockets.InstallEvents();
            SteamInput.InstallEvents();
            SteamUGC.InstallEvents();

            if (asyncCallbacks)
            {
                RunCallbacksAsync();
            }
        }