Skip to content

fix(core): report Unity version, platform and runtime in X-Client-Info - #556

Merged
Tr00d merged 1 commit into
masterfrom
fix/core-unity-version-detection
Oct 29, 2026
Merged

Tr00d merged 1 commit into
masterfrom
fix/core-unity-version-detection

Conversation

@Tr00d

@Tr00d Tr00d commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the Unity values in the X-Client-Info header reported in
#523 (comment).

Field Before (Unity, Android IL2CPP) After
platform Unix 5.15.189.13 Android
runtime / runtime-version dotnet / 4.0.30319.17020 il2cpp (no version) or mono / <version>
framework-version missing 6000.3.21f1

Changes

  • framework-version: read from UnityEngine.Application.unityVersion. The previous check looked for
    UnityAPICompatibilityVersionAttribute, which Unity never adds to assemblies at runtime.
  • platform: read from UnityEngine.Application.platform and mapped onto the existing names
    (IPhonePlayer → iOS, OSX* → macOS, Windows*/WSAPlayer* → Windows,
    Linux*/EmbeddedLinux* → Linux, WebGLPlayer → browser). Any other value is passed through unchanged.
  • runtime: on Unity, Environment.Version is a fixed .NET Framework 4 compatibility number.
    The runtime is now taken from RuntimeInformation.FrameworkDescription:
    mono with its version, or il2cpp (whose version is the engine version, already sent as framework-version).
  • Test seam: the values read from the host move into an internal HostEnvironment record.
    Tests change one field with with, and the fake attribute test double is removed.

@FozerG

FozerG commented Oct 28, 2026

Copy link
Copy Markdown

Hey finally got a sec to test this. x-client-info is helpful now, works fine in editor and on device build. thanks! ❤️

Editor: supabase-csharp/8.5.1+95906326e4fa4b5ae899281b7a746abcebad575c; platform=Windows; platform-version=10.0.26200.0; runtime=mono; runtime-version=6.13.0; framework=unity; framework-version=6000.3.21f1
Android IL2CPP build: supabase-csharp/8.5.1+95906326e4fa4b5ae899281b7a746abcebad575c; platform=Android; platform-version=5.15.189.13; runtime=il2cpp; framework=unity; framework-version=6000.3.21f1

@Tr00d
Tr00d marked this pull request as ready for review October 29, 2026 06:03
@Tr00d

Tr00d commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Awesome 😄 I'll publish a new update later today then

@Tr00d
Tr00d merged commit e1ede3f into master Oct 29, 2026
3 checks passed
@Tr00d
Tr00d deleted the fix/core-unity-version-detection branch October 29, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants