logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IReportingCharacterSpawner

    A character spawn service that tells its caller, with every spawn, whether a refusal was already reported to the author — so a caller that forfeits the refused character does not write a second line for the same cause.

    Namespace: Serenity.Character.Application.Interfaces.Services
    Assembly: Serenity.Character.Application.dll
    Syntax
    public interface IReportingCharacterSpawner
    Remarks

    The shipped character spawn service implements it: every refusal it makes (a key nobody registered, a character without a prefab, a prefab without a Character View, a failed bind) is logged by the service itself. The wave service asks for its actors through it when the installed ICharacterSpawnService is one; a replacement spawn service that does not implement it is read through Spawn(string, float, float, float, float, float, float, float), and each refusal it makes is reported by the caller instead.

    Methods

    TrySpawn(string, float, float, float, float, float, float, float)

    Spawns a character of the given archetype key at the specified world position and rotation, as Spawn(string, float, float, float, float, float, float, float) does.

    Declaration
    CharacterSpawnAttempt TrySpawn(string characterKey, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float rotW)
    Parameters
    Type Name Description
    string characterKey

    String identifier for the character archetype/prefab.

    float posX

    World position X.

    float posY

    World position Y.

    float posZ

    World position Z.

    float rotX

    Rotation quaternion X.

    float rotY

    Rotation quaternion Y.

    float rotZ

    Rotation quaternion Z.

    float rotW

    Rotation quaternion W.

    Returns
    Type Description
    CharacterSpawnAttempt

    The spawned character, or a refusal that says whether its cause was already reported.

    In this article
    © 2026 Serenity. All Rights Reserved