I am trying to create a character creation screen. I see that I am suppose to be using the GrantCharacterToUser call but I keep getting an ItemNotOwned error.
I am trying to create a character creation screen. I see that I am suppose to be using the GrantCharacterToUser call but I keep getting an ItemNotOwned error.
Yes, the Client version of GrantCharacterToUser requires that the player have an item in his inventory that has the CanBecomeCharacter flag set. This is so that titles can control character creation on player accounts (and so, prevent cheating). You can sell these "character token" items in stores, grant them to players as part of game actions, etc.
One alternative would be to use the Server version of GrantCharacterToUser in Cloud Script, as that version does not require that the player have a "character token" inventory item.
Do you have any sample code that uses the Unity SDK in order to perform actions that will associate a character with a players account as described above? Or maybe a tutorial that describes this process? thx!
Sorry, we don't have sample code that specifically shows this. The process, if you want to control it from the client side, is:
Thanks, Brendan this makes sense. However, for some reason even though the item is in my catalog, I am having trouble adding it to the player's inventory via PurchaseItem I get the following error:
{
"code": 400,
"status": "BadRequest",
"error": "ItemNotFound",
"errorCode": 1047,
"errorMessage": "Item not found",
"CallBackTimeMS": 328
}
2 People are following this question.