-
Notifications
You must be signed in to change notification settings - Fork 328
NEW: Added canRunInBackground flag in device debug view #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
device.canRunInBackground; | ||
|
||
// In editor, we may override canRunInBackground depending on the gameViewFocus setting. | ||
#if UNITY_EDITOR |
There was a problem hiding this comment.
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
There was a problem hiding this 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?
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.

Testing
Tested locally on windows with ISXB-415 project + auto test
Risk
no change, only new internal api
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: