Is PlayerPrefs safe?

Is PlayerPrefs safe?

Encrypting the file itself may be not a very good idea. You could encrypt the value, but another threat here is a “Replay attack” when the whole encrypted value in the file is replaced by a known encrypted value that means much gold 🙂 You need to decide the desired level of security/paranoia.

How do you save a list in unity?

Saving a list with Playerprefs

  1. using System. Collections;
  2. using System. Collections. Generic;
  3. using UnityEngine;
  4. using UnityEngine. UI;
  5. public class test : MonoBehaviour.
  6. {
  7. public List medicin = new List() ;
  8. public List savedMedicin = new List() ;

When should I use PlayerPrefs?

PlayerPrefs stores data in a plaintext file. This makes it easy to access and to edit. PlayerPrefs would be easy to hack, so never use it to store important data like a player’s experience points or score! PlayerPrefs is a great, simple tool for storing non-sensitive user information.

What is the purpose of playerprefs in Unity?

PlayerPrefs is intended for non-essential preference information, like control mapping or music/sfx settings – things the player can freely change anyway, and wouldn’t miss terribly if they were to (on Windows for example) use a system restore point and lose some of their registry information.

Is there a way to save player’s progress?

If this lost their high scores or campaign progress, players would be justifiably upset! Instead, it’s recommended to save gameplay progress in your own file (usually binary, possibly encrypted or signed if you want to make it harder to modify, but see Philipp’s comment below on this).

Is it safe to save player’s progress in Unity?

PlayerPrefs will work cross-platform, but it’s not recommended for gameplay progress save files because it’s insecure. As a plaintext file, a player can easily open it up and change the contents to cheat, or make your game behave unpredictably. It’s also not guaranteed to stay around.