Hello so we are working with the sdk playfab on out project so wer made a login screen then we have a charactere cration screen but for not we are just gonna gonna have 2 buttons "back" and "creat"
so we were trying to make a character id so we update the charcter data but it seems like we need the character data but its not even created yet can we have a example script or something to build on a character id etc .
this is our code
using System.Collections; using System.Collections.Generic; using UnityEngine; using PlayFab; using PlayFab.ClientModels; using UnityEngine.UI; public class playfabCharacter : MonoBehaviour { private string PlayFabId; private string CharacterID; public void UpdateCharacterData(Characterstats characterInfo) { Dictionary<string, string> charData = new Dictionary<string, string>() { {"Class", "Mage"}, //characterInfo.cClass.ToString() {"Race","human"}, // characterInfo.Race { "Power", "99999" } //characterInfo.Power.ToString() }; UpdateCharacterDataRequest request = new UpdateCharacterDataRequest(); // request.CharacterId = "1" ; request.Data = charData; PlayFabClientAPI.UpdateCharacterData(request, (result) => { Debug.Log("Successfully updated user data"); }, (error) => { Debug.Log("Got error setting user data Ancestor to Arthur"); Debug.Log(error.ErrorMessage); }); } public void CharacterCreation() { Characterstats newCharacter = new Characterstats(); newCharacter.Race = "Human";//though I recommend making this an enum newCharacter.cClass = CharacterClass.Warrior; newCharacter.Power = 1; UpdateCharacterData(newCharacter); } } public class Characterstats { public string name = ""; public int level = 1; public CharacterClass cClass = CharacterClass.Warrior; public string Race = ""; public int Power = 1; } public enum CharacterClass { Warrior, Mage, Priest }