Use Application.persistentDataPath for mutable files
While packaging (and patching) the game for Nix, I found that the game tries to write stuff to
Application.dataPath, however this path should be read-only and of course causes trouble packaging if the user doesn't have access to the data path (for example if it's mounted read-only, like on NixOS).
Unity3d already takes care of that in a cross-platform way using
persistentDataPath, which for example on GNU/Linux boils down to
$XDG_CONFIG_HOME/unity3d/Subterranean Games/War For The Overworld (btw. you might want to rename that to Brightrock Games) which is a standard location for config files.
Note that even the way Unity3d handles this is a bit oversimplified as for example
$XDG_DATA_HOME would be more suitable for things such as save game data, but better so than writing to
Of course the
GameSettings class would need a bit more work, because if
Settings.txt doesn't exist in
dataPath should be used (which would also be very useful for other stuff, because it's backwards-compatible).
Would be really great if you could change this, so I don't need to patch the assembly every time the game is updated.
This should also make the game less annoying with AV software on Windows btw. ;-)
Thanks :-) I'd really appreciate if you'd fix this.