Skip to content

Conversation

bmalrat
Copy link
Collaborator

@bmalrat bmalrat commented Sep 25, 2024

Description

When investigation this issue https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-415 it was not possible to know that some device can run in back ground or not.

Changes made

Added an internal editor only property to be able to access to device flags without the editor override that would hide the device capability.
Screenshot 2024-09-25 131602

Testing

Tested locally on windows with ISXB-415 project + auto test

Risk

no change, only new internal api

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • [X ] Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

device.canRunInBackground;

// In editor, we may override canRunInBackground depending on the gameViewFocus setting.
#if UNITY_EDITOR
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is already done in canRunInBackground

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good observability improvement.

- Changed representation of GamepadButton enum values in Inspector to display aliased enum values as a single item to avoid confusion around selection and aliased value display when multiple enum items map to the same numerical value. [ISXB-543](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-543)
- PlayerInput component now warns if the system cannot find matching control scheme, which can occur if all control schemes already paired (e.g. to other game objects with PlayerInput components) [ISXB-1020](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1020)
### Added
- Added the display of the device flag CanRunInBackground in device debug view.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Code format CanRunInBackground

// So, we modulate canRunInBackground depending on how input should behave WRT game view according
// to the input settings.
#if UNITY_EDITOR
#if UNITY_EDITOR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I find this multi function spanning #if a bit hard to parse. Would love it if this could be simplified.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. From a readability perspective, it's not great. Can this be improved @bmalrat ?

@jfreire-unity jfreire-unity self-requested a review September 26, 2024 13:32
@bmalrat bmalrat merged commit 5cfed50 into develop Sep 27, 2024
77 checks passed
@bmalrat bmalrat deleted the add-device-canruninbackground-in-debug-view branch September 27, 2024 12:43
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.

4 participants