public void RenderOnGUI()
    {
        GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height));
        GUILayout.Label("Variables:");
        GUILayout.Label("m_NumGamesStat: " + m_NumGamesStat);
        GUILayout.Label("m_FeetTraveledStat: " + m_FeetTraveledStat);
        GUILayout.Label("m_AchievedWinOneGame: " + m_AchievedWinOneGame);
        GUILayout.Label("m_SteamLeaderboard: " + m_SteamLeaderboard);
        GUILayout.Label("m_SteamLeaderboardEntries: " + m_SteamLeaderboardEntries);
        GUILayout.Label("m_Icon:");
        GUILayout.Label(m_Icon);
        GUILayout.EndArea();

        GUILayout.BeginVertical("box");
        m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33));

        if (GUILayout.Button("RequestCurrentStats()"))
        {
            bool ret = SteamUserStats.RequestCurrentStats();
            print("SteamUserStats.RequestCurrentStats() : " + ret);
        }

        {
            bool ret = SteamUserStats.GetStat("NumGames", out m_NumGamesStat);
            GUILayout.Label("GetStat(\"NumGames\", out m_NumGamesStat) : " + ret + " -- " + m_NumGamesStat);
        }

        {
            bool ret = SteamUserStats.GetStat("FeetTraveled", out m_FeetTraveledStat);
            GUILayout.Label("GetStat(\"FeetTraveled\", out m_FeetTraveledStat) : " + ret + " -- " + m_FeetTraveledStat);
        }

        if (GUILayout.Button("SetStat(\"NumGames\", m_NumGamesStat + 1)"))
        {
            bool ret = SteamUserStats.SetStat("NumGames", m_NumGamesStat + 1);
            print("SteamUserStats.SetStat(" + "\"NumGames\"" + ", " + m_NumGamesStat + 1 + ") : " + ret);
        }

        if (GUILayout.Button("SetStat(\"FeetTraveled\", m_FeetTraveledStat + 1)"))
        {
            bool ret = SteamUserStats.SetStat("FeetTraveled", m_FeetTraveledStat + 1);
            print("SteamUserStats.SetStat(" + "\"FeetTraveled\"" + ", " + m_FeetTraveledStat + 1 + ") : " + ret);
        }

        if (GUILayout.Button("UpdateAvgRateStat(\"AverageSpeed\", 100, 60.0)"))
        {
            bool ret = SteamUserStats.UpdateAvgRateStat("AverageSpeed", 100, 60.0);
            print("SteamUserStats.UpdateAvgRateStat(" + "\"AverageSpeed\"" + ", " + 100 + ", " + 60.0 + ") : " + ret);
        }

        {
            bool ret = SteamUserStats.GetAchievement("ACH_WIN_ONE_GAME", out m_AchievedWinOneGame);
            GUILayout.Label("GetAchievement(\"ACH_WIN_ONE_GAME\", out m_AchievedWinOneGame) : " + ret + " -- " + m_AchievedWinOneGame);
        }

        if (GUILayout.Button("SetAchievement(\"ACH_WIN_ONE_GAME\")"))
        {
            bool ret = SteamUserStats.SetAchievement("ACH_WIN_ONE_GAME");
            print("SteamUserStats.SetAchievement(" + "\"ACH_WIN_ONE_GAME\"" + ") : " + ret);
        }

        if (GUILayout.Button("ClearAchievement(\"ACH_WIN_ONE_GAME\")"))
        {
            bool ret = SteamUserStats.ClearAchievement("ACH_WIN_ONE_GAME");
            print("SteamUserStats.ClearAchievement(" + "\"ACH_WIN_ONE_GAME\"" + ") : " + ret);
        }

        {
            bool Achieved;
            uint UnlockTime;
            bool ret = SteamUserStats.GetAchievementAndUnlockTime("ACH_WIN_ONE_GAME", out Achieved, out UnlockTime);
            GUILayout.Label("GetAchievementAndUnlockTime(\"ACH_WIN_ONE_GAME\", out Achieved, out UnlockTime) : " + ret + " -- " + Achieved + " -- " + UnlockTime);
        }

        if (GUILayout.Button("StoreStats()"))
        {
            bool ret = SteamUserStats.StoreStats();
            print("SteamUserStats.StoreStats() : " + ret);
        }

        if (GUILayout.Button("GetAchievementIcon(\"ACH_WIN_ONE_GAME\")"))
        {
            int ret = SteamUserStats.GetAchievementIcon("ACH_WIN_ONE_GAME");
            print("SteamUserStats.GetAchievementIcon(" + "\"ACH_WIN_ONE_GAME\"" + ") : " + ret);
            if (ret != 0)
            {
                m_Icon = SteamUtilsTest.GetSteamImageAsTexture2D(ret);
            }
        }

        GUILayout.Label("GetAchievementDisplayAttribute(\"ACH_WIN_ONE_GAME\", \"name\") : " + SteamUserStats.GetAchievementDisplayAttribute("ACH_WIN_ONE_GAME", "name"));

        if (GUILayout.Button("IndicateAchievementProgress(\"ACH_WIN_100_GAMES\", 10, 100)"))
        {
            bool ret = SteamUserStats.IndicateAchievementProgress("ACH_WIN_100_GAMES", 10, 100);
            print("SteamUserStats.IndicateAchievementProgress(" + "\"ACH_WIN_100_GAMES\"" + ", " + 10 + ", " + 100 + ") : " + ret);
        }

        GUILayout.Label("GetNumAchievements() : " + SteamUserStats.GetNumAchievements());

        GUILayout.Label("GetAchievementName(0) : " + SteamUserStats.GetAchievementName(0));

        if (GUILayout.Button("RequestUserStats(TestConstants.Instance.k_SteamId_rlabrecque)"))
        {
            SteamAPICall_t handle = SteamUserStats.RequestUserStats(TestConstants.Instance.k_SteamId_rlabrecque);
            OnUserStatsReceivedCallResult.Set(handle);
            print("SteamUserStats.RequestUserStats(" + TestConstants.Instance.k_SteamId_rlabrecque + ") : " + handle);
        }

        {
            int  Data;
            bool ret = SteamUserStats.GetUserStat(TestConstants.Instance.k_SteamId_rlabrecque, "NumWins", out Data);
            GUILayout.Label("GetUserStat(TestConstants.Instance.k_SteamId_rlabrecque, \"NumWins\", out Data) : " + ret + " -- " + Data);
        }

        {
            float Data;
            bool  ret = SteamUserStats.GetUserStat(TestConstants.Instance.k_SteamId_rlabrecque, "MaxFeetTraveled", out Data);
            GUILayout.Label("GetUserStat(TestConstants.Instance.k_SteamId_rlabrecque, \"MaxFeetTraveled\", out Data) : " + ret + " -- " + Data);
        }

        {
            bool Achieved;
            bool ret = SteamUserStats.GetUserAchievement(TestConstants.Instance.k_SteamId_rlabrecque, "ACH_TRAVEL_FAR_ACCUM", out Achieved);
            GUILayout.Label("GetUserAchievement(TestConstants.Instance.k_SteamId_rlabrecque, \"ACH_TRAVEL_FAR_ACCUM\", out Achieved) : " + ret + " -- " + Achieved);
        }

        {
            bool Achieved;
            uint UnlockTime;
            bool ret = SteamUserStats.GetUserAchievementAndUnlockTime(TestConstants.Instance.k_SteamId_rlabrecque, "ACH_WIN_ONE_GAME", out Achieved, out UnlockTime);
            GUILayout.Label("GetUserAchievementAndUnlockTime(TestConstants.Instance.k_SteamId_rlabrecque, \"ACH_WIN_ONE_GAME\", out Achieved, out UnlockTime) : " + ret + " -- " + Achieved + " -- " + UnlockTime);
        }

        if (GUILayout.Button("ResetAllStats(true)"))
        {
            bool ret = SteamUserStats.ResetAllStats(true);
            print("SteamUserStats.ResetAllStats(" + true + ") : " + ret);
        }

        if (GUILayout.Button("FindOrCreateLeaderboard(\"Feet Traveled\", ELeaderboardSortMethod.k_ELeaderboardSortMethodAscending, ELeaderboardDisplayType.k_ELeaderboardDisplayTypeNumeric)"))
        {
            SteamAPICall_t handle = SteamUserStats.FindOrCreateLeaderboard("Feet Traveled", ELeaderboardSortMethod.k_ELeaderboardSortMethodAscending, ELeaderboardDisplayType.k_ELeaderboardDisplayTypeNumeric);
            OnLeaderboardFindResultCallResult.Set(handle);
            print("SteamUserStats.FindOrCreateLeaderboard(" + "\"Feet Traveled\"" + ", " + ELeaderboardSortMethod.k_ELeaderboardSortMethodAscending + ", " + ELeaderboardDisplayType.k_ELeaderboardDisplayTypeNumeric + ") : " + handle);
        }

        if (GUILayout.Button("FindLeaderboard(\"Feet Traveled\")"))
        {
            SteamAPICall_t handle = SteamUserStats.FindLeaderboard("Feet Traveled");
            OnLeaderboardFindResultCallResult.Set(handle);
            print("SteamUserStats.FindLeaderboard(" + "\"Feet Traveled\"" + ") : " + handle);
        }

        // Spams SteamAPI Warnings that the SteamLeaderboard does not exist.
        if (m_SteamLeaderboard != new SteamLeaderboard_t(0))
        {
            GUILayout.Label("GetLeaderboardName(m_SteamLeaderboard) : " + SteamUserStats.GetLeaderboardName(m_SteamLeaderboard));

            GUILayout.Label("GetLeaderboardEntryCount(m_SteamLeaderboard) : " + SteamUserStats.GetLeaderboardEntryCount(m_SteamLeaderboard));

            GUILayout.Label("GetLeaderboardSortMethod(m_SteamLeaderboard) : " + SteamUserStats.GetLeaderboardSortMethod(m_SteamLeaderboard));

            GUILayout.Label("GetLeaderboardDisplayType(m_SteamLeaderboard) : " + SteamUserStats.GetLeaderboardDisplayType(m_SteamLeaderboard));
        }
        else
        {
            GUILayout.Label("GetLeaderboardName(m_SteamLeaderboard) : ");
            GUILayout.Label("GetLeaderboardEntryCount(m_SteamLeaderboard) : ");
            GUILayout.Label("GetLeaderboardSortMethod(m_SteamLeaderboard) : ");
            GUILayout.Label("GetLeaderboardDisplayType(m_SteamLeaderboard) : ");
        }

        if (GUILayout.Button("DownloadLeaderboardEntries(m_SteamLeaderboard, ELeaderboardDataRequest.k_ELeaderboardDataRequestGlobal, 1, 5)"))
        {
            SteamAPICall_t handle = SteamUserStats.DownloadLeaderboardEntries(m_SteamLeaderboard, ELeaderboardDataRequest.k_ELeaderboardDataRequestGlobal, 1, 5);
            OnLeaderboardScoresDownloadedCallResult.Set(handle);
            print("SteamUserStats.DownloadLeaderboardEntries(" + m_SteamLeaderboard + ", " + ELeaderboardDataRequest.k_ELeaderboardDataRequestGlobal + ", " + 1 + ", " + 5 + ") : " + handle);
        }

        if (GUILayout.Button("DownloadLeaderboardEntriesForUsers(m_SteamLeaderboard, Users, Users.Length)"))
        {
            CSteamID[]     Users  = { SteamUser.GetSteamID() };
            SteamAPICall_t handle = SteamUserStats.DownloadLeaderboardEntriesForUsers(m_SteamLeaderboard, Users, Users.Length);
            OnLeaderboardScoresDownloadedCallResult.Set(handle);
            print("SteamUserStats.DownloadLeaderboardEntriesForUsers(" + m_SteamLeaderboard + ", " + Users + ", " + Users.Length + ") : " + handle);
        }

        if (GUILayout.Button("GetDownloadedLeaderboardEntry(m_SteamLeaderboardEntries, 0, out LeaderboardEntry, null, 0)"))
        {
            LeaderboardEntry_t LeaderboardEntry;
            bool ret = SteamUserStats.GetDownloadedLeaderboardEntry(m_SteamLeaderboardEntries, 0, out LeaderboardEntry, null, 0);
            print("SteamUserStats.GetDownloadedLeaderboardEntry(" + m_SteamLeaderboardEntries + ", " + 0 + ", " + "out LeaderboardEntry" + ", " + null + ", " + 0 + ") : " + ret + " -- " + LeaderboardEntry);
        }

        if (GUILayout.Button("UploadLeaderboardScore(m_SteamLeaderboard, ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodForceUpdate, (int)m_FeetTraveledStat, null, 0)"))
        {
            SteamAPICall_t handle = SteamUserStats.UploadLeaderboardScore(m_SteamLeaderboard, ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodForceUpdate, (int)m_FeetTraveledStat, null, 0);
            OnLeaderboardScoreUploadedCallResult.Set(handle);
            print("SteamUserStats.UploadLeaderboardScore(" + m_SteamLeaderboard + ", " + ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodForceUpdate + ", " + (int)m_FeetTraveledStat + ", " + null + ", " + 0 + ") : " + handle);
        }

        if (GUILayout.Button("AttachLeaderboardUGC(m_SteamLeaderboard, UGCHandle_t.Invalid)"))
        {
            SteamAPICall_t handle = SteamUserStats.AttachLeaderboardUGC(m_SteamLeaderboard, UGCHandle_t.Invalid);
            OnLeaderboardUGCSetCallResult.Set(handle);
            print("SteamUserStats.AttachLeaderboardUGC(" + m_SteamLeaderboard + ", " + UGCHandle_t.Invalid + ") : " + handle);
        }

        if (GUILayout.Button("GetNumberOfCurrentPlayers()"))
        {
            SteamAPICall_t handle = SteamUserStats.GetNumberOfCurrentPlayers();
            OnNumberOfCurrentPlayersCallResult.Set(handle);
            print("SteamUserStats.GetNumberOfCurrentPlayers() : " + handle);
        }

        if (GUILayout.Button("RequestGlobalAchievementPercentages()"))
        {
            SteamAPICall_t handle = SteamUserStats.RequestGlobalAchievementPercentages();
            OnGlobalAchievementPercentagesReadyCallResult.Set(handle);
            print("SteamUserStats.RequestGlobalAchievementPercentages() : " + handle);
        }

        {
            int Iterator;

            {
                string Name;
                float  Percent;
                bool   Achieved;
                Iterator = SteamUserStats.GetMostAchievedAchievementInfo(out Name, 120, out Percent, out Achieved);
                if (Iterator != -1)
                {
                    GUILayout.Label("GetMostAchievedAchievementInfo(out Name, 120, out Percent, out Achieved) : " + Iterator + " -- " + Name + " -- " + Percent + " -- " + Achieved);
                }
                else
                {
                    GUILayout.Label("GetMostAchievedAchievementInfo(out Name, 120, out Percent, out Achieved) : " + Iterator);
                }
            }

            if (Iterator != -1)
            {
                string Name;
                float  Percent;
                bool   Achieved;
                Iterator = SteamUserStats.GetNextMostAchievedAchievementInfo(Iterator, out Name, 120, out Percent, out Achieved);
                GUILayout.Label("GetNextMostAchievedAchievementInfo(out Name, 120, out Percent, out Achieved) : " + Iterator + " -- " + Name + " -- " + Percent + " -- " + Achieved);
            }
        }

        {
            float Percent;
            bool  ret = SteamUserStats.GetAchievementAchievedPercent("ACH_WIN_100_GAMES", out Percent);
            GUILayout.Label("GetAchievementAchievedPercent(\"ACH_WIN_100_GAMES\", out Percent) : " + ret + " -- " + Percent);
        }

        if (GUILayout.Button("RequestGlobalStats(3)"))
        {
            SteamAPICall_t handle = SteamUserStats.RequestGlobalStats(3);
            OnGlobalStatsReceivedCallResult.Set(handle);
            print("SteamUserStats.RequestGlobalStats(" + 3 + ") : " + handle);
        }

        /* TODO - Spams SteamAPI warnings
         * Does SpaceWar have a stat marked as "aggregated" to try out these functions?
         * {
         *      long Data;
         *      bool ret = SteamUserStats.GetGlobalStat("", out Data);
         *      GUILayout.Label("GetGlobalStat(\"\", out Data) : " + ret + " -- " + Data);
         * }
         */

        {
            double Data;
            bool   ret = SteamUserStats.GetGlobalStat("", out Data);
            GUILayout.Label("GetGlobalStat(\"\", out Data) : " + ret + " -- " + Data);
        }

        {
            long[] Data = new long[1];
            int    ret  = SteamUserStats.GetGlobalStatHistory("", Data, (uint)Data.Length);
            if (ret != 0)
            {
                GUILayout.Label("GetGlobalStatHistory(\"\", Data, " + (uint)Data.Length + ") : " + ret + " -- " + Data[0]);
            }
            else
            {
                GUILayout.Label("GetGlobalStatHistory(\"\", Data, " + (uint)Data.Length + ") : " + ret + " -- ");
            }
        }

        {
            double[] Data = new double[1];
            int      ret  = SteamUserStats.GetGlobalStatHistory("", Data, (uint)Data.Length);
            if (ret != 0)
            {
                GUILayout.Label("GetGlobalStatHistory(\"\", Data, " + (uint)Data.Length + ") : " + ret + " -- " + Data[0]);
            }
            else
            {
                GUILayout.Label("GetGlobalStatHistory(\"\", Data, " + (uint)Data.Length + ") : " + ret + " -- ");
            }
        }

        //SteamUserStats.InstallPS3Trophies() // PS3 Only.

        //SteamUserStats.GetTrophySpaceRequiredBeforeInstall() // PS3 Only.

        //SteamUserStats.SetUserStatsData() // PS3 Only.

        //SteamUserStats.GetUserStatsData() // PS3 Only.

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
    }
Exemple #2
0
    public void RenderOnGUI()
    {
        GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height));
        GUILayout.Label("Variables:");
        GUILayout.Label("m_Friend: " + m_Friend);
        GUILayout.Label("m_Clan: " + m_Clan);
        GUILayout.Label("m_CoPlayFriend: " + m_CoPlayFriend);
        GUILayout.Label("m_SmallAvatar:");
        GUILayout.Label(m_SmallAvatar);
        GUILayout.Label("m_MediumAvatar:");
        GUILayout.Label(m_MediumAvatar);
        GUILayout.Label("m_LargeAvatar:");
        GUILayout.Label(m_LargeAvatar);
        GUILayout.EndArea();

        GUILayout.BeginVertical("box");
        m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33));

        GUILayout.Label("GetPersonaName() : " + SteamFriends.GetPersonaName());

        if (GUILayout.Button("SetPersonaName(SteamFriends.GetPersonaName())"))
        {
            SteamAPICall_t handle = SteamFriends.SetPersonaName(SteamFriends.GetPersonaName());
            OnSetPersonaNameResponseCallResult.Set(handle);
            print("SteamFriends.SetPersonaName(" + SteamFriends.GetPersonaName() + ") : " + handle);
        }

        GUILayout.Label("GetPersonaState() : " + SteamFriends.GetPersonaState());

        GUILayout.Label("GetFriendCount(EFriendFlags.k_EFriendFlagImmediate) : " + SteamFriends.GetFriendCount(EFriendFlags.k_EFriendFlagImmediate));

        {
            m_Friend = SteamFriends.GetFriendByIndex(0, EFriendFlags.k_EFriendFlagImmediate);
            GUILayout.Label("GetFriendByIndex(0, EFriendFlags.k_EFriendFlagImmediate) : " + m_Friend);
        }

        GUILayout.Label("GetFriendRelationship(m_Friend) : " + SteamFriends.GetFriendRelationship(m_Friend));

        GUILayout.Label("GetFriendPersonaState(m_Friend) : " + SteamFriends.GetFriendPersonaState(m_Friend));

        GUILayout.Label("GetFriendPersonaName(m_Friend) : " + SteamFriends.GetFriendPersonaName(m_Friend));

        {
            var  fgi = new FriendGameInfo_t();
            bool ret = SteamFriends.GetFriendGamePlayed(m_Friend, out fgi);
            GUILayout.Label("GetFriendGamePlayed(m_Friend, out fgi) : " + ret + " -- " + fgi.m_gameID + " -- " + fgi.m_unGameIP + " -- " + fgi.m_usGamePort + " -- " + fgi.m_usQueryPort + " -- " + fgi.m_steamIDLobby);
        }

        GUILayout.Label("GetFriendPersonaNameHistory(m_Friend, 1) : " + SteamFriends.GetFriendPersonaNameHistory(m_Friend, 1));

        GUILayout.Label("GetFriendSteamLevel(m_Friend) : " + SteamFriends.GetFriendSteamLevel(m_Friend));

        GUILayout.Label("GetPlayerNickname(m_Friend) : " + SteamFriends.GetPlayerNickname(m_Friend));

        {
            int FriendsGroupCount = SteamFriends.GetFriendsGroupCount();
            GUILayout.Label("GetFriendsGroupCount() : " + FriendsGroupCount);

            if (FriendsGroupCount > 0)
            {
                FriendsGroupID_t FriendsGroupID = SteamFriends.GetFriendsGroupIDByIndex(0);
                GUILayout.Label("SteamFriends.GetFriendsGroupIDByIndex(0) : " + FriendsGroupID);

                GUILayout.Label("GetFriendsGroupName(FriendsGroupID) : " + SteamFriends.GetFriendsGroupName(FriendsGroupID));

                int FriendsGroupMembersCount = SteamFriends.GetFriendsGroupMembersCount(FriendsGroupID);
                GUILayout.Label("GetFriendsGroupMembersCount(FriendsGroupID) : " + FriendsGroupMembersCount);

                if (FriendsGroupMembersCount > 0)
                {
                    CSteamID[] FriendsGroupMembersList = new CSteamID[FriendsGroupMembersCount];
                    SteamFriends.GetFriendsGroupMembersList(FriendsGroupID, FriendsGroupMembersList, FriendsGroupMembersCount);
                    GUILayout.Label("GetFriendsGroupMembersList(FriendsGroupID, FriendsGroupMembersList, FriendsGroupMembersCount) : " + FriendsGroupMembersList[0]);
                }
            }
        }

        GUILayout.Label("HasFriend(m_Friend, EFriendFlags.k_EFriendFlagImmediate) : " + SteamFriends.HasFriend(m_Friend, EFriendFlags.k_EFriendFlagImmediate));

        GUILayout.Label("GetClanCount() : " + SteamFriends.GetClanCount());

        m_Clan = SteamFriends.GetClanByIndex(0);
        GUILayout.Label("GetClanByIndex(0) : " + m_Clan);

        GUILayout.Label("GetClanName(m_Clan) : " + SteamFriends.GetClanName(m_Clan));

        GUILayout.Label("GetClanTag(m_Clan) : " + SteamFriends.GetClanTag(m_Clan));

        {
            int  Online;
            int  InGame;
            int  Chatting;
            bool ret = SteamFriends.GetClanActivityCounts(m_Clan, out Online, out InGame, out Chatting);
            GUILayout.Label("GetClanActivityCounts(m_Clan, out Online, out InGame, out Chatting) : " + ret + " -- " + Online + " -- " + InGame + " -- " + Chatting);
        }

        if (GUILayout.Button("DownloadClanActivityCounts(Clans, Clans.Length)"))
        {
            CSteamID[]     Clans  = { m_Clan, TestConstants.Instance.k_SteamId_Group_SteamUniverse };
            SteamAPICall_t handle = SteamFriends.DownloadClanActivityCounts(Clans, Clans.Length);
            OnDownloadClanActivityCountsResultCallResult.Set(handle);             // This call never seems to produce the CallResult.
            print("SteamFriends.DownloadClanActivityCounts(" + Clans + ", " + Clans.Length + ") : " + handle);
        }

        {
            int FriendCount = SteamFriends.GetFriendCountFromSource(m_Clan);
            GUILayout.Label("GetFriendCountFromSource(m_Clan) : " + FriendCount);

            if (FriendCount > 0)
            {
                GUILayout.Label("GetFriendFromSourceByIndex(m_Clan, 0) : " + SteamFriends.GetFriendFromSourceByIndex(m_Clan, 0));
            }
        }

        GUILayout.Label("IsUserInSource(m_Friend, m_Clan) : " + SteamFriends.IsUserInSource(m_Friend, m_Clan));

        if (GUILayout.Button("SetInGameVoiceSpeaking(SteamUser.GetSteamID(), false)"))
        {
            SteamFriends.SetInGameVoiceSpeaking(SteamUser.GetSteamID(), false);
            print("SteamFriends.SetInGameVoiceSpeaking(" + SteamUser.GetSteamID() + ", " + false + ")");
        }

        if (GUILayout.Button("ActivateGameOverlay(\"Friends\")"))
        {
            SteamFriends.ActivateGameOverlay("Friends");
            print("SteamFriends.ActivateGameOverlay(" + "\"Friends\"" + ")");
        }

        if (GUILayout.Button("ActivateGameOverlayToUser(\"friendadd\", TestConstants.Instance.k_SteamId_rlabrecque)"))
        {
            SteamFriends.ActivateGameOverlayToUser("friendadd", TestConstants.Instance.k_SteamId_rlabrecque);
            print("SteamFriends.ActivateGameOverlayToUser(" + "\"friendadd\"" + ", " + TestConstants.Instance.k_SteamId_rlabrecque + ")");
        }

        if (GUILayout.Button("ActivateGameOverlayToWebPage(\"http://steamworks.github.io\")"))
        {
            SteamFriends.ActivateGameOverlayToWebPage("http://steamworks.github.io");
            print("SteamFriends.ActivateGameOverlayToWebPage(" + "\"http://steamworks.github.io\"" + ")");
        }

        if (GUILayout.Button("ActivateGameOverlayToStore(TestConstants.Instance.k_AppId_TeamFortress2, EOverlayToStoreFlag.k_EOverlayToStoreFlag_None)"))
        {
            SteamFriends.ActivateGameOverlayToStore(TestConstants.Instance.k_AppId_TeamFortress2, EOverlayToStoreFlag.k_EOverlayToStoreFlag_None);
            print("SteamFriends.ActivateGameOverlayToStore(" + TestConstants.Instance.k_AppId_TeamFortress2 + ", " + EOverlayToStoreFlag.k_EOverlayToStoreFlag_None + ")");
        }

        if (GUILayout.Button("SetPlayedWith(TestConstants.Instance.k_SteamId_rlabrecque)"))
        {
            SteamFriends.SetPlayedWith(TestConstants.Instance.k_SteamId_rlabrecque);
            print("SteamFriends.SetPlayedWith(" + TestConstants.Instance.k_SteamId_rlabrecque + ")");
        }

        if (GUILayout.Button("ActivateGameOverlayInviteDialog(TestConstants.Instance.k_SteamId_rlabrecque)"))
        {
            SteamFriends.ActivateGameOverlayInviteDialog(TestConstants.Instance.k_SteamId_rlabrecque);
            print("SteamFriends.ActivateGameOverlayInviteDialog(" + TestConstants.Instance.k_SteamId_rlabrecque + ")");
        }

        if (GUILayout.Button("GetSmallFriendAvatar(m_Friend)"))
        {
            int ret = SteamFriends.GetSmallFriendAvatar(m_Friend);
            print("SteamFriends.GetSmallFriendAvatar(" + m_Friend + ") : " + ret);
            m_SmallAvatar = SteamUtilsTest.GetSteamImageAsTexture2D(ret);
        }

        if (GUILayout.Button("GetMediumFriendAvatar(m_Friend)"))
        {
            int ret = SteamFriends.GetMediumFriendAvatar(m_Friend);
            print("SteamFriends.GetMediumFriendAvatar(" + m_Friend + ") : " + ret);
            m_MediumAvatar = SteamUtilsTest.GetSteamImageAsTexture2D(ret);
        }

        if (GUILayout.Button("GetLargeFriendAvatar(m_Friend)"))
        {
            int ret = SteamFriends.GetLargeFriendAvatar(m_Friend);
            print("SteamFriends.GetLargeFriendAvatar(" + m_Friend + ") : " + ret);
            m_LargeAvatar = SteamUtilsTest.GetSteamImageAsTexture2D(ret);
        }

        if (GUILayout.Button("RequestUserInformation(m_Friend, false)"))
        {
            bool ret = SteamFriends.RequestUserInformation(m_Friend, false);
            print("SteamFriends.RequestUserInformation(" + m_Friend + ", " + false + ") : " + ret);
        }

        if (GUILayout.Button("RequestClanOfficerList(m_Clan)"))
        {
            SteamAPICall_t handle = SteamFriends.RequestClanOfficerList(m_Clan);
            OnClanOfficerListResponseCallResult.Set(handle);
            print("SteamFriends.RequestClanOfficerList(" + m_Clan + ") : " + handle);
        }

        GUILayout.Label("GetClanOwner(m_Clan) : " + SteamFriends.GetClanOwner(m_Clan));

        GUILayout.Label("GetClanOfficerCount(m_Clan) : " + SteamFriends.GetClanOfficerCount(m_Clan));

        GUILayout.Label("GetClanOfficerByIndex(m_Clan, 0) : " + SteamFriends.GetClanOfficerByIndex(m_Clan, 0));

        GUILayout.Label("GetUserRestrictions() : " + SteamFriends.GetUserRestrictions());

        if (GUILayout.Button("SetRichPresence(\"status\", \"Testing 1.. 2.. 3..\")"))
        {
            bool ret = SteamFriends.SetRichPresence("status", "Testing 1.. 2.. 3..");
            print("SteamFriends.SetRichPresence(" + "\"status\"" + ", " + "\"Testing 1.. 2.. 3..\"" + ") : " + ret);
        }

        if (GUILayout.Button("ClearRichPresence()"))
        {
            SteamFriends.ClearRichPresence();
            print("SteamFriends.ClearRichPresence()");
        }

        GUILayout.Label("GetFriendRichPresence(SteamUser.GetSteamID(), \"status\") : " + SteamFriends.GetFriendRichPresence(SteamUser.GetSteamID(), "status"));

        GUILayout.Label("GetFriendRichPresenceKeyCount(SteamUser.GetSteamID()) : " + SteamFriends.GetFriendRichPresenceKeyCount(SteamUser.GetSteamID()));

        GUILayout.Label("GetFriendRichPresenceKeyByIndex(SteamUser.GetSteamID(), 0) : " + SteamFriends.GetFriendRichPresenceKeyByIndex(SteamUser.GetSteamID(), 0));

        if (GUILayout.Button("RequestFriendRichPresence(m_Friend)"))
        {
            SteamFriends.RequestFriendRichPresence(m_Friend);
            print("SteamFriends.RequestFriendRichPresence(" + m_Friend + ")");
        }

        if (GUILayout.Button("InviteUserToGame(SteamUser.GetSteamID(), \"testing\")"))
        {
            bool ret = SteamFriends.InviteUserToGame(SteamUser.GetSteamID(), "testing");
            print("SteamFriends.InviteUserToGame(" + SteamUser.GetSteamID() + ", " + "\"testing\"" + ") : " + ret);
        }

        GUILayout.Label("GetCoplayFriendCount() : " + SteamFriends.GetCoplayFriendCount());

        if (GUILayout.Button("GetCoplayFriend(0)"))
        {
            m_CoPlayFriend = SteamFriends.GetCoplayFriend(0);
            print("SteamFriends.GetCoplayFriend(" + 0 + ") : " + m_CoPlayFriend);
        }

        GUILayout.Label("GetFriendCoplayTime(m_CoPlayFriend) : " + SteamFriends.GetFriendCoplayTime(m_CoPlayFriend));

        GUILayout.Label("GetFriendCoplayGame(m_CoPlayFriend) : " + SteamFriends.GetFriendCoplayGame(m_CoPlayFriend));

        if (GUILayout.Button("JoinClanChatRoom(m_Clan)"))
        {
            SteamAPICall_t handle = SteamFriends.JoinClanChatRoom(m_Clan);
            OnJoinClanChatRoomCompletionResultCallResult.Set(handle);
            print("SteamFriends.JoinClanChatRoom(" + m_Clan + ") : " + handle);
        }

        if (GUILayout.Button("LeaveClanChatRoom(m_Clan)"))
        {
            bool ret = SteamFriends.LeaveClanChatRoom(m_Clan);
            print("SteamFriends.LeaveClanChatRoom(" + m_Clan + ") : " + ret);
        }

        GUILayout.Label("GetClanChatMemberCount(m_Clan) : " + SteamFriends.GetClanChatMemberCount(m_Clan));

        GUILayout.Label("GetChatMemberByIndex(m_Clan, 0) : " + SteamFriends.GetChatMemberByIndex(m_Clan, 0));

        if (GUILayout.Button("SendClanChatMessage(m_Clan, \"Test\")"))
        {
            bool ret = SteamFriends.SendClanChatMessage(m_Clan, "Test");
            print("SteamFriends.SendClanChatMessage(" + m_Clan + ", " + "\"Test\"" + ") : " + ret);
        }

        //GUILayout.Label("SteamFriends.GetClanChatMessage() : " + SteamFriends.GetClanChatMessage()); // N/A - Must be called from within the callback OnGameConnectedClanChatMsg

        GUILayout.Label("IsClanChatAdmin(m_Clan, m_Friend) : " + SteamFriends.IsClanChatAdmin(m_Clan, m_Friend));

        GUILayout.Label("IsClanChatWindowOpenInSteam(m_Clan) : " + SteamFriends.IsClanChatWindowOpenInSteam(m_Clan));

        if (GUILayout.Button("OpenClanChatWindowInSteam(m_Clan)"))
        {
            bool ret = SteamFriends.OpenClanChatWindowInSteam(m_Clan);
            print("SteamFriends.OpenClanChatWindowInSteam(" + m_Clan + ") : " + ret);
        }

        if (GUILayout.Button("CloseClanChatWindowInSteam(m_Clan)"))
        {
            bool ret = SteamFriends.CloseClanChatWindowInSteam(m_Clan);
            print("SteamFriends.CloseClanChatWindowInSteam(" + m_Clan + ") : " + ret);
        }

        if (GUILayout.Button("SetListenForFriendsMessages(true)"))
        {
            bool ret = SteamFriends.SetListenForFriendsMessages(true);
            print("SteamFriends.SetListenForFriendsMessages(" + true + ") : " + ret);
        }

        if (GUILayout.Button("ReplyToFriendMessage(SteamUser.GetSteamID(), \"Testing!\")"))
        {
            bool ret = SteamFriends.ReplyToFriendMessage(SteamUser.GetSteamID(), "Testing!");
            print("SteamFriends.ReplyToFriendMessage(" + SteamUser.GetSteamID() + ", " + "\"Testing!\"" + ") : " + ret);
        }

        //GUILayout.Label("SteamFriends.GetFriendMessage() : " + SteamFriends.GetFriendMessage()); // N/A - Must be called from within the callback OnGameConnectedFriendChatMsg

        if (GUILayout.Button("GetFollowerCount(SteamUser.GetSteamID())"))
        {
            SteamAPICall_t handle = SteamFriends.GetFollowerCount(SteamUser.GetSteamID());
            OnFriendsGetFollowerCountCallResult.Set(handle);
            print("SteamFriends.GetFollowerCount(" + SteamUser.GetSteamID() + ") : " + handle);
        }

        if (GUILayout.Button("IsFollowing(m_Friend)"))
        {
            SteamAPICall_t handle = SteamFriends.IsFollowing(m_Friend);
            OnFriendsIsFollowingCallResult.Set(handle);
            print("SteamFriends.IsFollowing(" + m_Friend + ") : " + handle);
        }

        if (GUILayout.Button("EnumerateFollowingList(0)"))
        {
            SteamAPICall_t handle = SteamFriends.EnumerateFollowingList(0);
            OnFriendsEnumerateFollowingListCallResult.Set(handle);
            print("SteamFriends.EnumerateFollowingList(" + 0 + ") : " + handle);
        }

        GUILayout.Label("IsClanPublic(m_Clan) : " + SteamFriends.IsClanPublic(m_Clan));

        GUILayout.Label("IsClanOfficialGameGroup(m_Clan) : " + SteamFriends.IsClanOfficialGameGroup(m_Clan));

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
    }
    void OnUserAchievementIconFetched(UserAchievementIconFetched_t pCallback)
    {
        Debug.Log("[" + UserAchievementIconFetched_t.k_iCallback + " - UserAchievementIconFetched] - " + pCallback.m_nGameID + " -- " + pCallback.m_rgchAchievementName + " -- " + pCallback.m_bAchieved + " -- " + pCallback.m_nIconHandle);

        m_Icon = SteamUtilsTest.GetSteamImageAsTexture2D(pCallback.m_nIconHandle);
    }