.exe and _data files related to project after build

Hello guys, I ve made a simple 2D game, and I wanted to build it. Everything seemed normal, and the game works, but I found out some aspects that are really annoying:

I think that my “Game.exe” or my “Game_Data” folder are someway related to my unity project. I use PlayerPrefabs to store some values about the place where I want my player to spawn (like Checkpoints), and if I reach a new checkpoint on my unity project, that gets reflected on my .exe game, so when I try to run it, my character appears on the checkpoint I ve just reached on the game inside my project.

I cant run the game on other computers as well, as I get some kind of loop that kills and spawns my player continuously (I think that’s a consecuence of what i said on the previous paragraph)… How could I fix that?

Thanks in advance

When dealing with PlayerPref’s the data is stored on the registry and at the same location, this means that both the Editor and Standalone will access the registry at the same location for the data. If you want to solve this problem, I would recommend looking at the System.IO namespace to create files and populate them.

using UnityEngine;
using System.Collections;
using System.IO;

public class Foo : MonoBehaviour
{
    void Awake()
    {
        System.IO.File.Create("bar.cfg");
    }
}

If you don’t want to use the System.IO namespace, you can call the PlayerPrefs Delete All method whenever the game starts.

PlayerPrefs.DeleteAll();

RESOURCES: