1

I was hoping to lock my save files to the device in order to prevent users sending save files to each other. The idea is to store the device ID inside the encrypted save data. To support multiple devices/new devices when restoring from cloud saves, the save file would support a list of device IDs, not just one.

Based on my research there is no reliable, consistent device ID property in Unity that works across android and iOS. So it may not be possible. Unless I'm missing something.

Does anyone have a solution?

Thanks

JamesK
  • 49
  • 9
  • 1
    Maybe [this answer](https://stackoverflow.com/a/44147543/7111561) could help you. To keep it simple you could just allways take the `MAC` address of the device instead. -> should be pretty unique. – derHugo Sep 17 '18 at 16:38
  • Thanks, looking into it. – JamesK Sep 17 '18 at 20:51
  • You can't get the MAC on iOS – Paulw11 Sep 17 '18 at 21:17
  • A quick alternative to make it at least much harder for the users would be to store the files in the `PersistentData`. If they don't have a rooted device the users wont have any access to those files. https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html – derHugo Sep 18 '18 at 05:02
  • I don't think that's true about Application.persistantDataPath in Unity. In my tests I am able to find my save files using a file browser app. Maybe that's because my Android is set to developer mode? Even so, I would say the files are accessible to users. – JamesK Sep 19 '18 at 00:34

0 Answers0