---
tags:
    - "Reset"
    - "Restart"
    - "Main"
    - "Menu"
---

# Unload Profile

[Save & Load](index.md) / **Unload Profile**

## Description

Unloads the current save and returns to the default values

## Parameters

| Name | Description |
| :--- | :---------- |
| Scene | The scene to load when resetting the save |

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Unload Profile")]
    [Image(typeof(IconDiskSolid), ColorTheme.Type.TextLight, typeof(BadgeCross))]
    
    [Description("Unloads the current save and returns to the default values")]
    [Category("Save & Load/Unload Profile")]
    
    [Parameter("Scene", "The scene to load when resetting the save")]
    
    [Keywords("Reset", "Restart", "Main", "Menu")]
    
    [Serializable]
    public class InstructionCoreLoadUnload : Instruction
    {
        [SerializeField] private GetScene m_Scene = new GetScene();

        protected override string GetTitle(GameObject source) => $"Unload to {this.m_Scene}";

        protected override async Awaitable Run(Args args)
        {
            int sceneIndex = this.m_Scene.Get(args);
            await SaveLoadManager.Unload(sceneIndex);
        }
    }
}
```

