Repository navigation
First release of Flagsmith for Unity: feature flags, remote config, live tuning and A/B tests for Unity games, powered by Flagsmith. Community package, MIT licensed. It is not an official Flagsmith SDK.
Install
Unity 6 (6000.0) or newer. In Window > Package Manager > + > Install package from git URL:
https://github.com/Harindulk/flagsmith-unity.git?path=/com.flagsmith.unity#v0.1.0
Or download com.flagsmith.unity-0.1.0.tgz below and choose Install package from tarball.
What's in it
FlagsmithClient: environment and identity flags with traits, typedGetValue<T>, one retry on network errors and HTTP 5xx.FlagsmithBehaviour: a persistent player identity, background refresh, aFlagsChangedevent, and automatic event flushing.[FlagsmithValue]andBind: fields and properties that follow their flags.- Experimentation:
GetExperimentFlagrecords an exposure for enrolled players, andTrackEventrecords the metric. Events are batched, sent once per session, saved to disk on pause and retried after network failures. - Offline support: the last good flags are cached on disk.
- An Editor window (Window > Flagsmith) to list, toggle and edit flags.
- WebGL support: everything runs on Unity's main thread with
UnityWebRequest. - The client refuses server-side environment keys.
Tested
26 automated tests in the Unity Editor, one of them against self-hosted Flagsmith 2.295.2. WebGL builds in Chrome and the Safari engine. An Android IL2CPP build on an emulator. iOS and desktop players, and Experimentation on Flagsmith Cloud, are not tested yet.