Assets\Scripts\GameControl.cs(114,9): error CS0120: An object reference is required for the non-static field, method, or property 'PlayFabManager.SendLeaderboard(int)'
Doesn't make sense because neither of them are static.
public void PlayerWin() { playingUI.SetActive(false); winMenu.SetActive(true); Cursor.lockState = CursorLockMode.None; camAnimator.SetTrigger("RunEnd"); PlayFabManager.SendLeaderboard(TimerController.timeScore); }
It's having a problem with the bottom line starting with "PlayFabManager..." Here is the code its referencing:
public void SendLeaderboard(int time) { var request = new UpdatePlayerStatisticsRequest { Statistics = new List<StatisticUpdate> { new StatisticUpdate { StatisticName = (levelName), Value = time } } }; PlayFabClientAPI.UpdatePlayerStatistics(request, OnLeaderboardUpdate, OnError); }
Any help would be much appreciated I have no idea what to do, tried referencing objects and making them static and it just gave more errors.