Esempio n. 1
0
        private void Awake()
        {
            const string fileName = "steam_appid.txt";

            if (File.Exists(fileName))
            {
                string content = File.ReadAllText(fileName);
                if (content != SteamAppID)
                {
                    File.WriteAllText(fileName, SteamAppID.ToString());
                    Debug.Log($"Updating {fileName}. Previous: {content}, new SteamAppID {SteamAppID}");
                }
            }
            else
            {
                File.WriteAllText(fileName, SteamAppID.ToString());
                Debug.Log($"New {fileName} written with SteamAppID {SteamAppID}");
            }

            Debug.Assert(Channels != null && Channels.Length > 0, "No channel configured for FizzySteamworks.");

            if (InitFacepunch)
            {
                SteamClient.Init(uint.Parse(SteamAppID), true);
            }

            Invoke(nameof(FetchSteamID), 1f);
        }
Esempio n. 2
0
 private bool InitialiseSteamworks(uint appid)
 {
     try
     {
         SteamClient.Init(appid, true);
     }
     catch (Exception e)
     {
         Debug.LogError($"Could be one of the following: Steam is closed, Can't find steam_api dlls or Don't have permission to open appid. Exception: {e.Message}");
         return(false);
     }
     return(true);
 }
Esempio n. 3
0
 private void Awake()
 {
     Debug.Assert(Channels != null && Channels.Length > 0, "No channel configured for FizzySteamMirror.");
     try
     {
         SteamClient.Init(SteamAppID, false);
         Invoke(nameof(FetchSteamID), 1f);
     }
     catch (Exception e)
     {
         Debug.LogError($"FizzyFacepunch could not initialise: {e.Message}");
     }
 }