Has Saved Game#
Save & Load / Has Saved Game
Can Read
Cannot Write
Description#
Returns true if there is a saved game at the specified profile slot
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Has Saved Game")]
[Category("Save & Load/Has Saved Game")]
[Description("Returns true if there is a saved game at the specified profile slot")]
[Image(typeof(IconDiskSolid), ColorTheme.Type.Lime, typeof(BadgeHash))]
[Keywords("Save", "Load", "Slot")]
[Serializable]
public class TypeBoolHasSaveInProfile : TypeBool
{
[SerializeField] private GetInteger m_Profile = new GetInteger();
public override bool Get(Args args)
{
int profile = this.m_Profile.GetInt(args);
return SaveLoadManager.HasProfileSaved(profile);
}
public override string ToString()
{
return $"Has Save at {this.m_Profile}";
}
}
}