feat(audience): normalize platform wire values, add isEditor (SDK-343)#771
Merged
ImmutableJeffrey merged 1 commit intoMay 11, 2026
Merged
Conversation
fffbebd to
f2a65d5
Compare
nattb8
previously approved these changes
May 11, 2026
f2a65d5 to
6a44f72
Compare
nattb8
reviewed
May 11, 2026
6a44f72 to
0e12f39
Compare
nattb8
approved these changes
May 11, 2026
- platform now sends Windows, macOS, Linux, iOS, Android. WindowsPlayer/WindowsEditor and OSXPlayer/OSXEditor and LinuxPlayer/LinuxEditor each collapse to one OS string. Studios no longer need LIKE 'Windows%' to filter by OS. - New isEditor bool on game_launch sources from Application.isEditor. Replaces the Player vs Editor signal previously buried inside platform, so studios can filter dev runs cleanly. - Unmapped RuntimePlatform values (console, WebGL, server builds) still fall back to the raw enum string so console traffic is not silently dropped. - osFamily is intentionally left as the raw SystemInfo.operatingSystemFamily value (Windows, MacOSX, Linux, Other), so power users still have direct access to Unity's view. platform is the curated public field; osFamily is the passthrough. - DeviceCollectorTests covers the new platform mappings and isEditor true/false. ImmutableAudienceTests provider example updated to "Windows". Breaking wire-format change. Blocks immutable/documentation#83 (SDK-319). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0e12f39 to
bb11e12
Compare
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.
Summary
Normalizes the
platformwire value for the audience SDK's auto-emittedgame_launchevent so the public schema speaks layman OS names instead of Unity'sRuntimePlatformenum strings, and adds anisEditorboolean so studios can filter dev runs cleanly.DeviceCollector.PlatformNamemapsRuntimePlatformtoWindows,macOS,Linux,iOS,Android. The Windows / OSX / Linux Player and Editor variants collapse to a single OS string each.RuntimePlatformvalues fall through toplatform.ToString(), so traffic from those targets is not silently dropped.isEditorboolean togame_launch, sourced fromApplication.isEditor. Replaces the Player-vs-Editor distinction previously embedded inplatform, so studios can filter dev runs out of production analytics on a dedicated field.osFamilyis intentionally left as the rawSystemInfo.operatingSystemFamily.ToString()value (Windows,MacOSX,Linux,Other).platformis the curated public field;osFamilystays as a passthrough so power users still have direct access to Unity's view.CollectGameLaunchPropertiesgains anisEditorOverrideparameter alongside the existingplatformOverride, so the new mappings are deterministically testable.DeviceCollectorTestscovers the new platform mappings for Windows / macOS / Linux in both Player and Editor variants, iOS, Android, unmapped fallback, andisEditortrue and false.ImmutableAudienceTests.Init_GameLaunch_IncludesLaunchContextProviderFieldsexample value updated from"WindowsPlayer"to"Windows"for consistency with the new convention.Breaking wire-format change for
platform. Any downstream consumer that filters onWindowsPlayer/OSXPlayer/LinuxPlayerwill need updating. The public data dictionary inimmutable/documentationis updated in parallel by #83.Linear: SDK-343