So i want to display on the UI.text for example this text:
public Text myDisplayText;
This function :print (value.StatValue + " " + value.DisplayName);
I am trying to do it like this but it is not working:
myText.text = value.StatValue + " " + value.DisplayName;
i get an error : NullReferenceException: Object reference not set to an instance of an object
If you notice yeah this is a leaderboard and it prints for example: User:test score:150 and i want to make a leaderboard if i can find how to convert to UI .text it would be great then i can figure out on how to do it.
public void GetLeaderboard() { var request = new GetLeaderboardRequest(); request.StartPosition = 0; request.StatisticName = "Coins"; PlayFabClientAPI.GetLeaderboard(request, OnLeaderboardSuccess, OnPlayFabError); } private void OnLeaderboardSuccess(GetLeaderboardResult obj) { foreach(var value in obj.Leaderboard) { print(value.StatValue + " " + value.DisplayName); } },
So i want to display on the UI.text for example this text:
public Text myDisplayText;
This function :print (value.StatValue + " " + value.DisplayName);
I am trying to do it like this but it is not working:
myText.text = value.StatValue + " " + value.DisplayName;
i get an error : NullReferenceException: Object reference not set to an instance of an object
If you notice yeah this is a leaderboard and it prints for example: User:test score:150 and i want to make a leaderboard if i can find how to convert to UI .text it would be great then i can figure out on how to do it.
public void GetLeaderboard() { var request = new GetLeaderboardRequest(); request.StartPosition = 0; request.StatisticName = "Coins"; PlayFabClientAPI.GetLeaderboard(request, OnLeaderboardSuccess, OnPlayFabError); } private void OnLeaderboardSuccess(GetLeaderboardResult obj) { foreach(var value in obj.Leaderboard) { print(value.StatValue + " " + value.DisplayName); } }