logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SignalReceivedCondition

    Met once a signal of the authored type has been dispatched a given number of times.

    Inheritance
    object
    SignalReceivedCondition
    Namespace: Serenity.Achievements.Infrastructure.Conditions
    Assembly: Serenity.UnityAchievements.Infrastructure.dll
    Syntax
    [AchievementConditionCategory(AchievementConditionCategory.Triggers)]
    public class SignalReceivedCondition : AchievementCondition
    Remarks

    The count is the one piece of achievement state the game itself does not hold: a project dispatches "an enemy died" and forgets it, so "a hundred enemies died" only exists here. That is why this leaf persists — without it, every relaunch would restart the tally.

    Constructors

    SignalReceivedCondition()

    Creates an unauthored condition, as Unity's polymorphic serializer does.

    Declaration
    public SignalReceivedCondition()

    SignalReceivedCondition(string, int)

    Creates a condition counting a given signal type.

    Declaration
    public SignalReceivedCondition(string signalTypeName, int requiredCount = 1)
    Parameters
    Type Name Description
    string signalTypeName

    The signal type name to count.

    int requiredCount

    How many of those signals unlock the achievement.

    Properties

    DisplayName

    Declaration
    public override string DisplayName { get; }
    Property Value
    Type Description
    string

    ObservedCount

    How many matching signals have been seen so far.

    Declaration
    public int ObservedCount { get; }
    Property Value
    Type Description
    int

    PersistsState

    Declaration
    public override bool PersistsState { get; }
    Property Value
    Type Description
    bool

    RequiredCount

    How many signals of that type unlock the achievement.

    Declaration
    public int RequiredCount { get; }
    Property Value
    Type Description
    int

    SignalTypeName

    The signal type name this condition counts.

    Declaration
    public string SignalTypeName { get; }
    Property Value
    Type Description
    string

    Methods

    CaptureState()

    Declaration
    public override string CaptureState()
    Returns
    Type Description
    string

    CollectSignalTypeNames(ICollection<string>)

    Declaration
    public override void CollectSignalTypeNames(ICollection<string> sink)
    Parameters
    Type Name Description
    ICollection<string> sink

    Describe(bool)

    Declaration
    public override string Describe(bool isNested)
    Parameters
    Type Name Description
    bool isNested
    Returns
    Type Description
    string

    GetProgress(in AchievementEvaluationContext)

    Declaration
    public override AchievementConditionProgress GetProgress(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context
    Returns
    Type Description
    AchievementConditionProgress

    IsMet(in AchievementEvaluationContext)

    Declaration
    public override bool IsMet(in AchievementEvaluationContext context)
    Parameters
    Type Name Description
    AchievementEvaluationContext context
    Returns
    Type Description
    bool

    Reset()

    Declaration
    public override void Reset()

    RestoreState(string)

    Restores the tally, clamped to what the condition can still use. A stored count arrives from a store and may have been written against a larger requirement, so anything past the current one is treated as "already satisfied" rather than left to grow unbounded.

    Declaration
    public override void RestoreState(string state)
    Parameters
    Type Name Description
    string state

    The tally previously captured.

    Validate()

    Declaration
    public override string Validate()
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved