Skip to content

feat(audience): auto-collect Epic account ID and detect Epic platform#799

Open
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-535-epic-account-id
Open

feat(audience): auto-collect Epic account ID and detect Epic platform#799
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-535-epic-account-id

Conversation

@nattb8

@nattb8 nattb8 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • When the EOS Unity plugin (PlayEveryWare.EpicOnlineServices) is present and EOSManager has been initialised by the game, the SDK now automatically calls Identify() with the logged-in ProductUserId at Init
  • Sets distribution_platform = "epic" in game_launch properties when EOS is active
  • Detection uses C# reflection — no hard compile-time dependency on EOS; games without EOS are completely unaffected
  • link.xml entries for EOSSDK and PlayEveryWare.EpicOnlineServices prevent IL2CPP from stripping the types reached via reflection; absent assemblies are silently ignored

The reflection chain: EOSManager.InstanceGetEOSPlatformInterface()GetConnectInterface()GetLoggedInUserByIndex(0)ProductUserId.ToString()

Notes for docs (SDK-536)

  • EOS must be initialised via EOSManager before ImmutableAudience.Init() is called — the SDK reads the logged-in state at Init time; late EOS init will not be picked up
  • If the game uses the raw EOS C SDK without the PlayEveryWare Unity plugin, auto-collect will not fire; studios must call Identify() manually
  • distribution_platform can be overridden via AudienceConfig.DistributionPlatform; the config value always wins over auto-detection

Test plan

  • Verified full reflection chain resolves under IL2CPP on macOS (arm64) using mock EOS DLLs
  • auto-identified epic user: <id> log line appears when EOS is initialised
  • distribution_platform = "epic" set in game_launch when EOS platform interface is available
  • No log output (no warn, no crash) when EOS is absent — Steam-only or no-platform games unaffected

🤖 Generated with Claude Code

When the EOS Unity plugin (PlayEveryWare.EpicOnlineServices) is present and EOSManager has been initialised by the game, the SDK now calls Identify() with the logged-in ProductUserId and sets distribution_platform = 'epic' in game_launch.

Detection uses C# reflection with no hard compile-time dependency. link.xml entries for EOSSDK and PlayEveryWare.EpicOnlineServices prevent IL2CPP stripping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 requested review from a team as code owners June 23, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant