- Home /
How to load user data (PLayFab)
So, i am using playfab for setting up my multiplayer backend. I used the get user data code provided by playfab, the code is working but the clothes/skins are not loading. The playfab team told me to ask in unity forums on how to display a Unity GameObject in the scene. Here's the code, please let me know what I need to add to display skins/character clothes.
Blockquote
using System.Collections; using System.Collections.Generic; using UnityEngine; using PlayFab; using PlayFab.ClientModels; using TMPro; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement;
public class userdata : MonoBehaviour {
public void GetUserData(string myPlayFabeId) { PlayFabClientAPI.GetUserData(new GetUserDataRequest() { PlayFabId = myPlayFabeId, Keys = null }, result => { Debug.Log("Got user data:"); if (result.Data == null || !result.Data.ContainsKey("TORSO")) Debug.Log("No TORSO"); else Debug.Log("TORSO: "+result.Data.ContainsKey("TORSO")); }, (error) => { Debug.Log("Got error retrieving user data:"); Debug.Log(error.GenerateErrorReport()); }); } }
Blockquote