title: Unity/PlayFab DisplayName 'string' does not contain a definition for 'text' and no accessible extension me accepting a first argument of type 'string'
body: <p>I'm not able to print the display name stored in playfab in the settings, reception of the username is enabled, and the user exists but I can't retrieve and print it so that the script fills in the user in the text field I always get this error:</p>
  <blockquote>
  <p>error CS1061: 'string' does not contain a definition for 'text' and no accessible extension method 'text' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  <p>When I comment out the line containing the <code>username.text</code> the debug prints the username correctly to the console.</p>
  <pre><code>public void PlayerData()
  {
      PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest(
      (result) =&gt;
      {
          Debug.Log(username);
          username.text = result.AccountInfo.Username;
      },
      (error) =&gt;
      {
      Debug.LogError(error.GenerateErrorReport());
      });
  }
  </code></pre>
  <hr />
  <p>Full code PlayFabControler</p>
  <pre><code>using PlayFab;
  using PlayFab.ClientModels;
  using UnityEngine;
  using UnityEngine.SceneManagement;
  using System.Collections.Generic;
  using PlayFab.Json;
  using PlayFab.ProfilesModels;
  using JsonObject = PlayFab.Json.JsonObject;
  using System;
  
  
  public class PlayFabController : MonoBehaviour 
  {
  
  
      public static PlayFabController PFC;
  
      private string userEmail;
      private string userPassword;
      private string username;
      public GameObject loginPanel;
  
      private void OnEnable()
      {
          if(PlayFabController.PFC == null)
          {
              PlayFabController.PFC = this;
          }
          else
          {
              if(PlayFabController.PFC != this)
              {
                  Destroy(this.gameObject);
              }
          }
          DontDestroyOnLoad(this.gameObject);
  
      }
  
      public void Start()
      {
          //Note: Setting title Id here can be skipped if you have set the value in Editor Extensions already.
          if (string.IsNullOrEmpty(PlayFabSettings.TitleId))
          {
              PlayFabSettings.TitleId = &quot;8741&quot;; // Please change this value to your own titleId from PlayFab Game Manager
          }
          PlayerPrefs.DeleteAll();
          //var request = new LoginWithCustomIDRequest { CustomId = &quot;GettingStartedGuide&quot;, CreateAccount = true };
  
          // PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnLoginFailure);
          if(PlayerPrefs.HasKey(&quot;EMAIL&quot;))
          {
              userEmail = PlayerPrefs.GetString(&quot;EMAIL&quot;);
              userPassword = PlayerPrefs.GetString(&quot;PASSWORD&quot;);
          var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPassword };
          PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure);
           
          }
        
  
      }
  
      #region Login
      private void OnLoginSuccess(LoginResult result)
      {
          Debug.Log(&quot;Congratulations, you made your first successful API call!&quot;);
          PlayerPrefs.SetString(&quot;EMAIL&quot;, userEmail);
          PlayerPrefs.SetString(&quot;PASSWORD&quot;, userPassword);
          loginPanel.SetActive(false);
          GetStats();
            //  SceneManager.LoadScene(&quot;Menu&quot;);
         
  
      }
      private void OnRegisterSuccess(RegisterPlayFabUserResult result)
      {
          Debug.Log(&quot;Congratulations, you made your first successful API call!&quot;);
          PlayerPrefs.SetString(&quot;EMAIL&quot;, userEmail);
          PlayerPrefs.SetString(&quot;PASSWORD&quot;, userPassword);
          GetStats();
          loginPanel.SetActive(false);
      }
      private void OnLoginFailure(PlayFabError error)
      {
          var registerRequest = new RegisterPlayFabUserRequest { Email = userEmail, Password = userPassword, Username = username };
          PlayFabClientAPI.RegisterPlayFabUser(registerRequest, OnRegisterSuccess, OnRegisterFailure);
      }
      private void OnRegisterFailure(PlayFabError error)
      {
          Debug.LogError(error.GenerateErrorReport());
      }
      public void GetUserEmail(string emailIn)
      {
          userEmail = emailIn;
      }
      public void GetUsername(string usernameIn)
      {
          username = usernameIn; 
      }
  
      public void GetUserPassword(string passwordIn)
      {
          userPassword = passwordIn;
      }
      public void OnClickLogin()
      {
          var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPassword,  };
          PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure);
      }
      #endregion Login
      public int playerLevel;
      public int gameLevel;
  
      public int playerHealth;
      public int playerDamage;
  
      public int playerHighScore;
      public int playerGolds;
  
  
      public void PlayerData()
      {
          PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest(),
  (result) =&gt;
  {
      
      Debug.Log(username);
      //username.text = result.username;
      username = result.AccountInfo.Username;
      
  },
  (error) =&gt;
  {
      Debug.LogError(error.GenerateErrorReport());
  });
      }
      #region PlayerStats
  
      public void SetStats()
      {
          PlayFabClientAPI.UpdatePlayerStatistics(new UpdatePlayerStatisticsRequest{
              // request.Statistics is a list, so multiple StatisticUpdate objects can be defined if required.
              Statistics = new List&lt;StatisticUpdate&gt; {
          new StatisticUpdate { StatisticName = &quot;PlayerLevel&quot;, Value = playerLevel },
          new StatisticUpdate { StatisticName = &quot;GameLevel&quot;, Value = gameLevel },
          new StatisticUpdate { StatisticName = &quot;PlayerHealth&quot;, Value = playerHealth },
          new StatisticUpdate { StatisticName = &quot;PlayerDamage&quot;, Value = playerDamage },
          new StatisticUpdate { StatisticName = &quot;PlayerHighScore&quot;, Value = playerHighScore },
          new StatisticUpdate { StatisticName = &quot;PlayerGolds&quot;, Value = playerGolds },
      }
          },
      result =&gt; { Debug.Log(&quot;User statistics updated&quot;); },
      error =&gt; { Debug.LogError(error.GenerateErrorReport()); });
      }
  
  
      void GetStats()
      {
          PlayFabClientAPI.GetPlayerStatistics(
              new GetPlayerStatisticsRequest(),
              OnGetStats,
              error =&gt; Debug.LogError(error.GenerateErrorReport())
          );
      }
  
      void OnGetStats(GetPlayerStatisticsResult result)
      {
          Debug.Log(&quot;Received the following Statistics:&quot;);
          foreach (var eachStat in result.Statistics)
          {
              Debug.Log(&quot;Statistic (&quot; + eachStat.StatisticName + &quot;): &quot; + eachStat.Value);
              switch(eachStat.StatisticName)
              {
                  case &quot;PlayerLevel&quot;:
                      playerLevel = eachStat.Value;
                      break;
  
                  case &quot;GameLevel&quot;:
                      gameLevel = eachStat.Value;
                      break;
                  case &quot;PlayerHealth&quot;:
                      playerHealth = eachStat.Value;
                      break;
                  case &quot;PlayerDamage&quot;:
                      playerDamage = eachStat.Value;
                      break;
                  case &quot;PlayerHighScore&quot;:
                      playerHighScore = eachStat.Value;
                      break;
                  case &quot;PlayerGolds&quot;:
                      playerGolds = eachStat.Value;
                      break;
              }
          }
      }
      // Build the request object and access the API
     public void StartCloudUpdatePlayerStats()
      {
          PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest()
          {
              FunctionName = &quot;UpdatePlayerStats&quot;, // Arbitrary function name (must exist in your uploaded cloud.js file)
              FunctionParameter = new { Level = playerLevel, GameLevel = gameLevel, Health = playerHealth, Damage = playerDamage, highScore = playerHighScore, Golds = playerGolds },
              GeneratePlayStreamEvent = true, // Optional - Shows this event in PlayStream
          }, OnCloudUpdateStats, OnErrorShared);
      }
      // OnCloudHelloWorld defined in the next code block
  
      private static void OnCloudUpdateStats(ExecuteCloudScriptResult result)
      {
          // CloudScript (Legacy) returns arbitrary results, so you have to evaluate them one step and one parameter at a time
          
          JsonObject jsonResult = (JsonObject)result.FunctionResult;
          object messageValue;
          jsonResult.TryGetValue(&quot;messageValue&quot;, out messageValue); // note how &quot;messageValue&quot; directly corresponds to the JSON values set in CloudScript (Legacy)
          Debug.Log((string)messageValue);
      }
  
      private static void OnErrorShared(PlayFabError error)
      {
          Debug.Log(error.GenerateErrorReport());
      }
      #endregion PlayerStats
  }
  </code></pre>