Create a gist now

Instantly share code, notes, and snippets.

private void CreateCharacterInTable()
{
var newCharacter = new CharacterEntity
{
CharacterID = Guid.NewGuid().ToString(),
BodySpriteName = selectedBody,
FaceSpriteName = selectedFace,
ShirtSpriteName = selectedShirt,
HairSpriteName = selectedHair,
PantsSpriteName = selectedPants,
ShoesSpriteName = selectedShoes,
Name = nameInput.text,
Age = Int32.Parse(ageInput.text),
Dexterity = Int32.Parse(dexterityInput.text),
Intelligence = Int32.Parse(intelligenceInput.text),
Strength = Int32.Parse(strengthInput.text)
};
// Save the character asynchronously to the table.
Context.SaveAsync(newCharacter, (result) =>
{
if (result.Exception == null)
resultText.text += @"character saved";
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment