ENG-74: Add GetConfiguration() to Unity AirConsole plugin#154
Open
marc-n-dream wants to merge 3 commits intomasterfrom
Open
ENG-74: Add GetConfiguration() to Unity AirConsole plugin#154marc-n-dream wants to merge 3 commits intomasterfrom
marc-n-dream wants to merge 3 commits intomasterfrom
Conversation
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.
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
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:_configurationprivate field stores the parsedJTokenfrom READYOnReady: parsesconfigurationfrom the READY message and stores itResetCaches: clears_configurationGetConfiguration()public method with XML doc (screen-only note, throwsNotReadyExceptionbefore READY)AirConsoleTests.cs: 4 EditMode tests total:GetConfiguration_WhenReady_ReturnsConfiguration— happy pathGetConfiguration_BeforeReady_ThrowsNotReadyException— pre-READY guardGetConfiguration_AfterResetCaches_ReturnsNull— cache clearGetConfiguration_WhenReadyDataLacksConfiguration_ReturnsNull— absent keySimulateResetCaches()reflection helper added toAirConsoleTestRunnerDependencies
Depends on
airconsole-appenginePR #3488 being merged first — that PR injects theconfigurationpayload into the READY event. Can be merged in parallel withairconsole-api.Testing
All existing Unity EditMode tests continue to pass. 4 new EditMode tests added.
Jira
ENG-74