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- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as core_experiments from "gamepush.core.experiments"
- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
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