Skip to content

ENG-74: Add GetConfiguration() to Unity AirConsole plugin#154

Open
marc-n-dream wants to merge 3 commits intomasterfrom
feature/ENG-74-platform-capability-configuration
Open

ENG-74: Add GetConfiguration() to Unity AirConsole plugin#154
marc-n-dream wants to merge 3 commits intomasterfrom
feature/ENG-74-platform-capability-configuration

Conversation

@marc-n-dream
Copy link
Copy Markdown
Collaborator

@marc-n-dream marc-n-dream commented Mar 30, 2026

Summary

Adds GetConfiguration() to the Unity AirConsole plugin. The method returns the platform capability configuration injected into the READY event by the appengine.

Changes

  • AirConsole.cs:
    • _configuration private field stores the parsed JToken from READY
    • OnReady: parses configuration from the READY message and stores it
    • ResetCaches: clears _configuration
    • New GetConfiguration() public method with XML doc (screen-only note, throws NotReadyException before READY)
  • AirConsoleTests.cs: 4 EditMode tests total:
    • GetConfiguration_WhenReady_ReturnsConfiguration — happy path
    • GetConfiguration_BeforeReady_ThrowsNotReadyException — pre-READY guard
    • GetConfiguration_AfterResetCaches_ReturnsNull — cache clear
    • GetConfiguration_WhenReadyDataLacksConfiguration_ReturnsNull — absent key
    • SimulateResetCaches() reflection helper added to AirConsoleTestRunner

Dependencies

Depends on airconsole-appengine PR #3488 being merged first — that PR injects the configuration payload into the READY event. Can be merged in parallel with airconsole-api.

Testing

All existing Unity EditMode tests continue to pass. 4 new EditMode tests added.

Jira

ENG-74

Parse configuration from OnReady message into _configuration field,
reset it in ResetCaches, and expose via GetConfiguration() returning
a JToken with supportedVideoFormats, transparentVideoSupported,
unityVideoSupported, and graphicsQualityTier. Adds EditMode test.

ENG-74 Task 4
…, Task 6)

Clarify that GetConfiguration() is only available on the screen device,
returns null on controllers, and is delivered via the ready event.
BeforeReady_ThrowsNotReadyException, AfterResetCaches_ReturnsNull,
WhenReadyDataLacksConfiguration_ReturnsNull — closes review finding M3.
Also adds SimulateResetCaches() reflection helper to AirConsoleTestRunner.
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.

1 participant