Search Unity

Question Do I need to create a player ID?

Discussion in 'Economy' started by Corva-Nocta, Feb 21, 2023.

  1. Corva-Nocta

    Corva-Nocta

    Joined:
    Feb 7, 2013
    Posts:
    801
    Hey all, just wondering if I am going to create a system with authenticate and cloud code and economy and I want the playerId to be the actual username of the player, do I need to create that profile first before adding things like items to the inventory, or will the player get added automatically?

    For example, if I wanted to create a profile with a playerId of Corva-Nocta, do I need to run some cloud code to create the playerId Corva-Nocta and then run separate code to say add a sword to the inventory? Or can I just add an item to the playerId and it will both create that playerId and add the item at the same time?
     
  2. lsaeteurn

    lsaeteurn

    Joined:
    Jan 26, 2023
    Posts:
    93
    You can use CloudSave to add a name field to the player's data, but you can't make the names unique (yet).