Type alias DataManagerId

DataManagerId: {
    id: string;
    isGlobal?: boolean;
}

Identifies a DataManager instance uniquely within the game.

Each DataManager (client or server) has a unique ID that can be used to synchronize state between clients and the server.

Type declaration

  • id: string

    The unique identifier for this data manager. Should be descriptive of its purpose.

  • Optional isGlobal?: boolean

    If true, this data manager is global across all posts. If false or undefined, this data manager is specific to a single post.

Example

// A game-specific data manager
const gameStateId: DataManagerId = { id: "gameState" };

// A player-specific data manager
const playerStateId: DataManagerId = { id: `player_${userId}` };

// A global data manager (shared across all posts)
const globalHighScoresId: DataManagerId = {
id: "global_high_scores",
isGlobal: true
};