[DOCS-13875] Add Unity Feature Flags documentation#35341
Merged
Conversation
e593405 to
bc89345
Compare
Add comprehensive Unity Feature Flags documentation with two implementations: 1. unity.md - Direct FlagsClient API (current implementation) - Uses DdFlags.CreateClient() and direct FlagsClient methods - Synchronous flag evaluation (GetBooleanValue, GetStringValue, etc.) - Simpler API without async/await 2. unity-openfeature.md - OpenFeature integration (future/alternative) - Uses OpenFeature Api.Instance.GetClient() - Async flag evaluation methods - Standards-based approach Both pages: - Include cross-links to each other for easy navigation - Follow the structure of Android/iOS feature flags docs - Include installation, setup, evaluation, and advanced config sections - Add Unity card to feature flags client navigation The documentation is ready for preview and user feedback.
Replace full documentation with minimal placeholder pages to test CI: - Keep navigation links and cross-references - Add 'Documentation coming soon' message - Reduce from ~270 lines to ~28 lines each - Test if minimal changes pass all CI checks Full documentation will be added incrementally after CI validation.
bc89345 to
cac19fc
Compare
Contributor
Preview links (active after the
|
…e docs Incremental update to unity-openfeature.md: - Add detailed Overview explaining OpenFeature integration - Add complete Installation instructions (EDM4U, Unity package, Android setup) - Add Initialize SDK section with reference to Unity Monitoring Setup - Add reference links at bottom File size: 27 → 68 lines (+41 lines)
Add back all sections to unity-openfeature.md: - Enable flags - Create and retrieve a client - Set the evaluation context - Evaluate flags (boolean, string, integer, double, object) - Flag evaluation details - Advanced configuration Also fixes duplicate further_reading partial and adds OpenFeature external link to further_reading frontmatter.
Add back all sections to unity.md: - Overview - Installation - Initialize the SDK - Enable flags - Create and retrieve a client - Set the evaluation context - Evaluate flags (boolean, string, integer, double, object) - Flag evaluation details - Advanced configuration
Feature flags are no longer in preview. Removed the callout from both unity.md and unity-openfeature.md to match the other SDK pages (android, ios, javascript, react).
…section - FlagsConfiguration is now immutable (constructor-based, not object initializer) - Add Getting Started quickstart section to unity.md - Fix DdFlags.Instance.CreateClient() throughout unity.md - Update parameter names to match constructor signatures (camelCase) - Add EvaluationFlushIntervalSeconds clamp range [1, 60] to both pages
- Revert FlagsConfiguration to object initializer syntax (mutable properties, PascalCase) - Restore DdFlags.SetEvaluationContext() as static method (not on client) - DdFlags.CreateClient() returns void; OpenFeature client retrieved via Api.Instance.GetClient() - Add Getting Started quickstart section - Restore correct advanced config property names (PascalCase)
- DdFlags is an instance class with immutable FlagsConfiguration (constructor syntax) - DdFlags.Instance.CreateProvider() returns provider for registration with OpenFeature - Provider registered via Api.Instance.SetProviderAsync(provider) - Evaluation context set via OpenFeature standard EvaluationContext.Builder() - No Datadog-specific context types or direct provider method calls - Rename "Create and retrieve a client" section to "Register the provider"
- Evaluation context set via client.SetEvaluationContext(FlagsEvaluationContext) not OpenFeature context builder
- DdFlags.Instance.CreateClient() returns FlagsClient (held for context setting); OpenFeature client retrieved separately via Api.Instance.GetClient()
- Show Unity coroutine pattern (WaitUntil) for async flag evaluation — MonoBehaviour does not support await
- Fix named provider registration: Api.Instance.SetProviderAsync("domain", provider)
- Add Getting Started as full MonoBehaviour example
- Remove unused openfeature.dev footnote
- Merge unity.md and unity-openfeature.md into one page, OpenFeature-first - Add aliases for old unity-openfeature URLs - Direct FlagsClient API moved to collapsed advanced section at the bottom - Drop FlagDetails documentation (FlagDetails<T> and FlagEvaluationError are now internal) - Flag evaluation details section uses OpenFeature FlagEvaluationDetails types only - Delete unity-openfeature.md and unity.md.bak
- new DatadogFeatureProvider(client) replaces DdFlags.Instance.CreateProvider() - DatadogFeatureProvider is in separate com.datadoghq.unity.flags.openfeature package - using Datadog.Unity.Flags.OpenFeature namespace required - DdFlags.Instance is always non-null (static readonly singleton) - CreateClient() returns IFlagsClient (public interface) - FlagDetails<T> and FlagEvaluationError are public — restore detail methods in direct API section - Installation section updated for two-package architecture and NuGetForUnity
- Remove all OpenFeature references and the openfeature package install steps - Follow iOS page structure: Enable → Create client → Set context → Evaluate → Advanced config - DdFlags.Enable() / DdFlags.Instance.CreateClient() / client.SetEvaluationContext() - Synchronous typed getters: GetBooleanValue, GetStringValue, GetIntegerValue, GetDoubleValue, GetObjectValue - FlagDetails<T> detail methods documented - FlagsConfiguration uses constructor syntax (immutable) - Backup of previous state at typo/unity-feature-flags-docs-openfeature-backup
Contributor
|
Created DOCS-13881 for the editorial review. |
joepeeples
requested changes
Apr 3, 2026
Comment on lines
+4
to
+5
| aliases: | ||
| - /feature_flags/setup/unity/ |
Contributor
There was a problem hiding this comment.
I don't think we need a redirect because the page never existed at this location.
Contributor
Author
There was a problem hiding this comment.
thanks, good catch!
|
|
||
| 1. Install the [External Dependency Manager for Unity (EDM4U)][1]. This can be done using [Open UPM][2]. | ||
|
|
||
| 2. Add the Datadog SDK Unity package from its Git URL at [https://github.com/DataDog/unity-package][3]. The package URL is `https://github.com/DataDog/unity-package.git`. |
Contributor
There was a problem hiding this comment.
Suggested change
| 2. Add the Datadog SDK Unity package from its Git URL at [https://github.com/DataDog/unity-package][3]. The package URL is `https://github.com/DataDog/unity-package.git`. | |
| 2. Add the [Datadog SDK Unity package][3] using its Git URL `https://github.com/DataDog/unity-package.git`. |
| ); | ||
| {{< /code-block >}} | ||
|
|
||
| This method fetches flag assignments from the server asynchronously in the background. The operation is non-blocking and thread-safe. Flag updates are available for subsequent evaluations once the background operation completes. |
Contributor
There was a problem hiding this comment.
Suggested change
| This method fetches flag assignments from the server asynchronously in the background. The operation is non-blocking and thread-safe. Flag updates are available for subsequent evaluations once the background operation completes. | |
| This method fetches flag assignments from the server asynchronously in the background. The operation is non-blocking and thread-safe. Flag updates are available for subsequent evaluations after the background operation completes. |
|
|
||
| ## Set the evaluation context | ||
|
|
||
| Define who or what the flag evaluation applies to using a `FlagsEvaluationContext`. The evaluation context includes user or session information used to determine which flag variations should be returned. Call this method before evaluating flags to ensure proper targeting. |
Contributor
There was a problem hiding this comment.
Suggested change
| Define who or what the flag evaluation applies to using a `FlagsEvaluationContext`. The evaluation context includes user or session information used to determine which flag variations should be returned. Call this method before evaluating flags to ensure proper targeting. | |
| Define who or what the flag evaluation applies to using a `FlagsEvaluationContext`. The evaluation context includes user or session information used to determine which flag variations should be returned. Call this method before evaluating flags to help ensure proper targeting. |
- Remove /feature_flags/setup/unity/ alias (URL never existed) - Simplify Git URL installation step wording - ensure -> help ensure (Vale rule) - once the -> after the (Vale rule)
Contributor
Author
|
Thanks Joe for the fixes and nav-bar add. PTAL |
jhgilbert
approved these changes
Apr 8, 2026
StefonSimmons
pushed a commit
that referenced
this pull request
Apr 16, 2026
* Add Unity Feature Flags documentation
Add comprehensive Unity Feature Flags documentation with two implementations:
1. unity.md - Direct FlagsClient API (current implementation)
- Uses DdFlags.CreateClient() and direct FlagsClient methods
- Synchronous flag evaluation (GetBooleanValue, GetStringValue, etc.)
- Simpler API without async/await
2. unity-openfeature.md - OpenFeature integration (future/alternative)
- Uses OpenFeature Api.Instance.GetClient()
- Async flag evaluation methods
- Standards-based approach
Both pages:
- Include cross-links to each other for easy navigation
- Follow the structure of Android/iOS feature flags docs
- Include installation, setup, evaluation, and advanced config sections
- Add Unity card to feature flags client navigation
The documentation is ready for preview and user feedback.
* Simplify Unity Feature Flags docs to placeholders
Replace full documentation with minimal placeholder pages to test CI:
- Keep navigation links and cross-references
- Add 'Documentation coming soon' message
- Reduce from ~270 lines to ~28 lines each
- Test if minimal changes pass all CI checks
Full documentation will be added incrementally after CI validation.
* Add Overview, Installation, and Initialize SDK sections to OpenFeature docs
Incremental update to unity-openfeature.md:
- Add detailed Overview explaining OpenFeature integration
- Add complete Installation instructions (EDM4U, Unity package, Android setup)
- Add Initialize SDK section with reference to Unity Monitoring Setup
- Add reference links at bottom
File size: 27 → 68 lines (+41 lines)
* Restore full OpenFeature docs for Unity Feature Flags
Add back all sections to unity-openfeature.md:
- Enable flags
- Create and retrieve a client
- Set the evaluation context
- Evaluate flags (boolean, string, integer, double, object)
- Flag evaluation details
- Advanced configuration
Also fixes duplicate further_reading partial and adds
OpenFeature external link to further_reading frontmatter.
* Restore full Unity Feature Flags direct API documentation
Add back all sections to unity.md:
- Overview
- Installation
- Initialize the SDK
- Enable flags
- Create and retrieve a client
- Set the evaluation context
- Evaluate flags (boolean, string, integer, double, object)
- Flag evaluation details
- Advanced configuration
* Remove preview callout from Unity Feature Flags docs
Feature flags are no longer in preview. Removed the callout
from both unity.md and unity-openfeature.md to match the
other SDK pages (android, ios, javascript, react).
* Update Unity Feature Flags docs with correct API and Getting Started section
- FlagsConfiguration is now immutable (constructor-based, not object initializer)
- Add Getting Started quickstart section to unity.md
- Fix DdFlags.Instance.CreateClient() throughout unity.md
- Update parameter names to match constructor signatures (camelCase)
- Add EvaluationFlushIntervalSeconds clamp range [1, 60] to both pages
* Fix Unity OpenFeature docs to match openfeature SDK worktree
- Revert FlagsConfiguration to object initializer syntax (mutable properties, PascalCase)
- Restore DdFlags.SetEvaluationContext() as static method (not on client)
- DdFlags.CreateClient() returns void; OpenFeature client retrieved via Api.Instance.GetClient()
- Add Getting Started quickstart section
- Restore correct advanced config property names (PascalCase)
* Rewrite Unity OpenFeature docs to match intended API design
- DdFlags is an instance class with immutable FlagsConfiguration (constructor syntax)
- DdFlags.Instance.CreateProvider() returns provider for registration with OpenFeature
- Provider registered via Api.Instance.SetProviderAsync(provider)
- Evaluation context set via OpenFeature standard EvaluationContext.Builder()
- No Datadog-specific context types or direct provider method calls
- Rename "Create and retrieve a client" section to "Register the provider"
* Fix Unity OpenFeature docs to match intended API design
- Evaluation context set via client.SetEvaluationContext(FlagsEvaluationContext) not OpenFeature context builder
- DdFlags.Instance.CreateClient() returns FlagsClient (held for context setting); OpenFeature client retrieved separately via Api.Instance.GetClient()
- Show Unity coroutine pattern (WaitUntil) for async flag evaluation — MonoBehaviour does not support await
- Fix named provider registration: Api.Instance.SetProviderAsync("domain", provider)
- Add Getting Started as full MonoBehaviour example
- Remove unused openfeature.dev footnote
* Consolidate Unity Feature Flags into a single page
- Merge unity.md and unity-openfeature.md into one page, OpenFeature-first
- Add aliases for old unity-openfeature URLs
- Direct FlagsClient API moved to collapsed advanced section at the bottom
- Drop FlagDetails documentation (FlagDetails<T> and FlagEvaluationError are now internal)
- Flag evaluation details section uses OpenFeature FlagEvaluationDetails types only
- Delete unity-openfeature.md and unity.md.bak
* Remove openfeature URL aliases from Unity docs
* Update Unity Feature Flags docs for PR #210 API changes
- new DatadogFeatureProvider(client) replaces DdFlags.Instance.CreateProvider()
- DatadogFeatureProvider is in separate com.datadoghq.unity.flags.openfeature package
- using Datadog.Unity.Flags.OpenFeature namespace required
- DdFlags.Instance is always non-null (static readonly singleton)
- CreateClient() returns IFlagsClient (public interface)
- FlagDetails<T> and FlagEvaluationError are public — restore detail methods in direct API section
- Installation section updated for two-package architecture and NuGetForUnity
* Fix installation: NuGetForUnity is a transitive UPM dep, not a manual install step
* Rewrite Unity Feature Flags docs: direct API only, no OpenFeature
- Remove all OpenFeature references and the openfeature package install steps
- Follow iOS page structure: Enable → Create client → Set context → Evaluate → Advanced config
- DdFlags.Enable() / DdFlags.Instance.CreateClient() / client.SetEvaluationContext()
- Synchronous typed getters: GetBooleanValue, GetStringValue, GetIntegerValue, GetDoubleValue, GetObjectValue
- FlagDetails<T> detail methods documented
- FlagsConfiguration uses constructor syntax (immutable)
- Backup of previous state at typo/unity-feature-flags-docs-openfeature-backup
* add new Unity page to side nav
* Address joepeeples review comments on unity.md
- Remove /feature_flags/setup/unity/ alias (URL never existed)
- Simplify Git URL installation step wording
- ensure -> help ensure (Vale rule)
- once the -> after the (Vale rule)
---------
Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
Fixes DOCS-13875
Adds documentation for the Datadog Feature Flags SDK for Unity (
dd-sdk-unityPR #206).Documentation added:
content/en/feature_flags/client/unity.md— covers the full directIFlagsClientAPI:DdFlags.Enable()/DdFlags.Instance.CreateClient()SetEvaluationContextwith targeting key and attributesFlagDetails<T>detail methods (value, variant, reason, error)FlagsConfigurationconstructor options)Unity card added to the feature flags client navigation partial
Structure follows the iOS and Android Feature Flags doc pattern.
Merge instructions
Merge readiness:
Additional notes
This PR is ready for technical and editorial review. The SDK PRs (#206, #210) are still open — merge readiness is gated on the SDK landing first.
Preview: https://docs-staging.datadoghq.com/tyler.potter/unity-feature-flags-docs/feature_flags/client/unity/