How to delete or reset costumproperties?

Options
I added some costumproperties and I want to delete all of them. I I tried
PhotonNetwork.LocalPlayer.SetCustomProperties(turnHash, null);
but does'nt work :(

Comments

  • Someone to help me? :'(
  • Tobias
    Options
    Add the keys you want to delete to turnHash but leave their values empty.
    That should be all.
  • alexlukangaAO
    edited January 2021
    Options
    Thanks Tobias

    turnHush contains an int value.
    how do I do?
    It would be like
    turnHash.Add("value", null)
    
    or leave int empty like this
    turnHash.Add("value")
    
  • Ok, got it. Thanks :)
  • alexlukangaAO
    edited January 2021
    Options
    When it starts I add turhHash value 1
    turnHash.Add ("Turn", 1)
    
    and in an instant I try to add a new value
    turnHash.Add ("Turn", 0)
    
    and I have this essue

    A getting
    ArgumentException: An item with the same key has already been added. Key: Turn
    

  • alexlukangaAO
    edited January 2021
    Options
    Ok, got it. Just do
    turnHash["Turn"] = 0;
    

    Thanks Tobias