public static void Init(uint appid)
        {
            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();

            RunCallbacksAsync();
        }
Пример #2
0
        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();

            RunCallbacksAsync();
        }