Skip to Content
defold-typescript libraries
megalanthusdefold-gamepush

megalanthus/defold-gamepush/gamepush.core.experiments

GamePush experiments: the player's experiments and cohort checks.

  • GitHub: megalanthus/defold-gamepush — pinned to v1.4.1
    1. Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as core_experiments from "gamepush.core.experiments"

Functions

map(): Record<string, unknown>

The experiments the player takes part in, keyed by experiment tag; empty when none.

Returns

  • Record<string, unknown>

list(): Record<string, unknown>

The same as map, kept for backward compatibility.

Returns

  • Record<string, unknown>

has(tag: string, cohort: string): boolean

Whether the player is in a cohort of an experiment.

Parameters

  • tag: string — The experiment's tag.
  • cohort: string — The cohort's tag.

Returns

  • boolean

On this page