logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCheckpointTriggerComponent

    No-code checkpoint: placed on a trigger volume, it records a checkpoint through ICheckpointService when an admitted object walks in. The checkpoint carries the checkpoint's name as its label, the scene's name as its stage and the respawn point's pose (UnityCheckpointRespawnPose) as its data, which is what a respawn script reads back.

    Inheritance
    object
    UnityCheckpointTriggerComponent
    Namespace: Serenity.Checkpoint.Infrastructure.Components
    Assembly: Serenity.UnityCheckpoint.Infrastructure.dll
    Syntax
    public class UnityCheckpointTriggerComponent : UnityTriggerVolumeComponent
    Remarks

    Record Only Once asks the saved checkpoints, not the trigger: a checkpoint already saved under this name for this scene is not recorded again, so reloading the scene or respawning does not record it a second time. The trigger also remembers that it recorded, so later visits in the same scene skip the question. A saved checkpoint another checkpoint has since replaced in its slot is no longer held, so after a reload the first visit records it again. Checkpoint is an optional module: without it the trigger records nothing and writes one warning naming the task that installs it. A visit that records nothing does not use up a record-once checkpoint, so a later visit after the module installs still records it. Checkpoint publishes no signal of its own, so there is none to emit.

    Constructors

    UnityCheckpointTriggerComponent()

    Declaration
    public UnityCheckpointTriggerComponent()

    Properties

    CheckpointName

    The name the checkpoint is saved under; empty uses this GameObject's name.

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

    HasRecorded

    True once this trigger has recorded its checkpoint at least once.

    Declaration
    public bool HasRecorded { get; }
    Property Value
    Type Description
    bool

    RecordOnlyOnce

    Whether a checkpoint the saved checkpoints already hold is not recorded again.

    Declaration
    public bool RecordOnlyOnce { get; set; }
    Property Value
    Type Description
    bool

    RespawnPoint

    Where a respawn puts the player back; empty uses this GameObject's own pose.

    Declaration
    public Transform RespawnPoint { get; set; }
    Property Value
    Type Description
    Transform

    Slot

    The checkpoint slot the checkpoint is saved to.

    Declaration
    public CheckpointSlot Slot { get; set; }
    Property Value
    Type Description
    CheckpointSlot

    Methods

    OnAdmittedObjectEntered(GameObject)

    Declaration
    protected override void OnAdmittedObjectEntered(GameObject enteringVisitor)
    Parameters
    Type Name Description
    GameObject enteringVisitor
    In this article
    © 2026 Serenity. All Rights Reserved