How would I reset changed values in a ScriptableObject on game start?

Hey guys, got a question.

So I’m working with this scriptable object TileData here, which has a bool HasSafehouse on it. During the game, this will become true if you’ve added on a safehouse to it (which I have working). The problem is, once I turn that boolean true, it stays true even when I exit out of play mode into the editor, and then start it up again. So, is there a way to reset the boolean, or any other values I assign to the scriptable object for that matter, to their original values on game start?

Sorry if the code is shit or anything, just got back into Unity and trying to find my footing.

[CreateAssetMenu]

public class TileData : ScriptableObject
{

  public bool HasSafehouse = false;

  public TileBase[] Tiles;

}

The code below is some of the other code where I get all the data and apply it to my tilemap. Didn’t know if I could do it here, but figured I should include it

    [SerializeField]
    private Tilemap Map;

    [SerializeField]
    private List<TileData> TileDatas;

    private void Awake ()
    {
      DataFromTiles = new Dictionary<TileBase, TileData>();

      foreach (var TileData in TileDatas)
      {
        foreach (var Tile in TileData.Tiles)
        {
          DataFromTiles.Add(Tile, TileData);
        }
      }
    }

I don’t think so but you can just create a new instance with ScriptableObject.CreateInstance and the new one will have default values. But why use a ScriptableObject if you just want defaults from code? Just create a plain old C# class then.

Hm, that’s a good point. I was using ScriptableObjects so that I could define unique values for each tile, but I think using it for that purpose is the exact opposite way it is supposed to be used lol. Probably will have to rethink my problem.

This seems like a perfectly fine way to use scriptable objects. The point is to create just one type of ScriptableObject and create many instances of it with different values in your project.