# SaveToFile(string)

Method in [InMemoryVariableStorage](https://docs.yarnspinner.dev/2.0/api/csharp/yarn.unity/yarn.unity.inmemoryvariablestorage)

## Summary

Serialize all variables to JSON, then write the data to a file.

```csharp
public void SaveToFile(string filepath)
```

## Parameters

| Name              | Description |
| ----------------- | ----------- |
| `string` filepath |             |
