API

Assembly: Spark.Character Interface: ICharacterPlugin Implementation: CharacterPlugin

Interface

public interface ICharacterPlugin
{
    List<CharacterEntry> GetAllCharacterEntries();
    CharacterEntry GetCharacterEntry(string characterId);
    bool HasCharacterEntry(string characterId);
}

Methods

GetAllCharacterEntries

List<CharacterEntry> GetAllCharacterEntries()

Returns all character entries in the database.

GetCharacterEntry

CharacterEntry GetCharacterEntry(string characterId)

Returns the character entry with the given ID, or null if not found.

HasCharacterEntry

Returns true if a character entry with the given ID exists.

CharacterEntry

Inherits from SparkDatabaseEntry. Defines a character template.

Standard fields inherited from SparkDatabaseEntry:

  • id (string): Unique identifier

  • entryName (string): Internal name

  • displayName (string): Player-facing name

  • description (string): Player-facing description

  • icon (Sprite): Character portrait/icon

The Character entry is intentionally minimal. Character depth comes from extensions added by other plugins (Combat stats, Progression, Items, etc.).

Components

CharacterEntity

MonoBehaviour that links a scene GameObject to a CharacterEntry.

PlayerAvatarEntity

MonoBehaviour that marks an entity as the local player character. Registers with SparkEntityRegistry as the player entity.

Save Data

Class
Description

CharacterSaveData

Stores character state for persistence

CharacterSaveDataRegistration

Registers save/load with the Save plugin

Usage

Last updated

Was this helpful?