logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCheckpointService

    Unity MonoBehaviour implementation of ICheckpointService.

    Inheritance
    object
    UnityCheckpointService
    Implements
    ICheckpointService
    IService
    IFoundationSettings
    Namespace: Serenity.Checkpoint.Infrastructure.Services
    Assembly: Serenity.UnityCheckpoint.Infrastructure.dll
    Syntax
    public class UnityCheckpointService : MonoBehaviour, ICheckpointService, IService, IFoundationSettings
    Remarks

    Delegates persistence to an ICheckpointStore implementation. The service creates CheckpointSnapshot values and passes them to the store for serialization and storage.

    Constructors

    UnityCheckpointService()

    Declaration
    public UnityCheckpointService()

    Fields

    LOG_CATEGORY

    Declaration
    protected const string LOG_CATEGORY = "CheckpointService"
    Field Value
    Type Description
    string

    _guid

    Declaration
    protected string _guid
    Field Value
    Type Description
    string

    _id

    Declaration
    protected string _id
    Field Value
    Type Description
    string

    _logService

    Declaration
    protected ILogService _logService
    Field Value
    Type Description
    ILogService

    _store

    Declaration
    protected ICheckpointStore _store
    Field Value
    Type Description
    ICheckpointStore

    Properties

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    LogService

    Declaration
    public ILogService LogService { get; set; }
    Property Value
    Type Description
    ILogService

    Methods

    Delete(CheckpointSlot)

    Declaration
    public virtual void Delete(CheckpointSlot slot)
    Parameters
    Type Name Description
    CheckpointSlot slot

    HasCheckpoint(CheckpointSlot)

    Declaration
    public virtual bool HasCheckpoint(CheckpointSlot slot)
    Parameters
    Type Name Description
    CheckpointSlot slot
    Returns
    Type Description
    bool

    InitializeService(ILogService, ICheckpointStore)

    Initializes the service with required dependencies.

    Declaration
    public virtual void InitializeService(ILogService logService, ICheckpointStore store)
    Parameters
    Type Name Description
    ILogService logService

    The logging service for diagnostic output.

    ICheckpointStore store

    The checkpoint store for persistence.

    QueryAvailable()

    Declaration
    public virtual IReadOnlyList<CheckpointMetadata> QueryAvailable()
    Returns
    Type Description
    IReadOnlyList<CheckpointMetadata>

    Save(CheckpointSlot, byte[], CheckpointMetadata)

    Declaration
    public virtual CheckpointId Save(CheckpointSlot slot, byte[] data, CheckpointMetadata metadata)
    Parameters
    Type Name Description
    CheckpointSlot slot
    byte[] data
    CheckpointMetadata metadata
    Returns
    Type Description
    CheckpointId

    TryLoad(CheckpointSlot, out CheckpointSnapshot)

    Declaration
    public virtual bool TryLoad(CheckpointSlot slot, out CheckpointSnapshot snapshot)
    Parameters
    Type Name Description
    CheckpointSlot slot
    CheckpointSnapshot snapshot
    Returns
    Type Description
    bool

    TryLoad(CheckpointId, out CheckpointSnapshot)

    Declaration
    public virtual bool TryLoad(CheckpointId id, out CheckpointSnapshot snapshot)
    Parameters
    Type Name Description
    CheckpointId id
    CheckpointSnapshot snapshot
    Returns
    Type Description
    bool

    Implements

    ICheckpointService
    IService
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved