Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Save Profile#

Save & Load / Save Profile

Description#

Saves the game at a specific profile slot

Parameters#

Name Description
Profile The profile slot to save to

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Save Profile")]
    [Image(typeof(IconDiskSolid), ColorTheme.Type.Lime, typeof(BadgeArrowLeft))]
    
    [Description("Saves the game at a specific profile slot")]
    [Category("Save & Load/Save Profile")]
    
    [Parameter("Profile", "The profile slot to save to")]
    
    [Serializable]
    public class InstructionCoreSaveProfile : Instruction
    {
        [SerializeField] private GetInteger m_Profile = new GetInteger();

        protected override string GetTitle(GameObject source) => $"Save at {this.m_Profile}";

        protected override Awaitable Run(Args args)
        {
            int profile = this.m_Profile.GetInt(args);
            SaveLoadManager.Save(profile);
            
            return Done;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.