yes Unity is saving all data (including PlayerPrefs) to IndexedDB.
You can see these files i.e. in Chrome DevTools under "Application":
Storage-> IndexedDB -> /idbfs {{YOUR SERVER}} -> FILE_DATA
We you make a new build with a different Unity-Version or a different machine the hash-value changes. So the saved files from the old build can not be found by Applicaton.persistentDataPath
A workaround can be using the LocalStorage
from your browser if you are only saving strings or numbers.
You can write some javascript functions (for example in <script>
tags in your template file) to store your text data there - it very similar to the PlayerPrefs:
var saveData = function(yourkey, yourdata){
localStorage.setItem(yourkey, yourdata);
}
to save values. And
var loadData = function(yourkey){
localStorage.getItem(yourkey);
}
to get them.
Create a plugin.jslib file in Unity Editor and call these functions:
mergeInto(LibraryManager.library, {
GetData: function(yourkey){
if(typeof loadData !== 'undefined'){
loadData(Pointer_stringify(yourkey));
} else {
console.log("Javacript function not available...");
}
},
SetData: function(yourkey, yourdata){
if(typeof saveData !== 'undefined'){
saveData(Pointer_stringify(yourkey), Pointer_stringify(yourdata));
} else {
console.log("Javacript function not available...");
}
}
});
Now you can call them from Script as metioned here