-
Notifications
You must be signed in to change notification settings - Fork 329
FIX: ISXB-1013-prevent-ui-update-loop #1984
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
### Fixed | ||
- Fixed memory allocation on every frame when using UIDocument without EventSystem. [ISXB-953](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-953) | ||
- Fixed Action Maps name edition which could be inconsistent in Input Action Editor UI. | ||
- Fixed an update loop in the asset 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.
Would suggest describing the symptom and the actual issue happening that was fixed here instead or what do you think?
{ | ||
var item = m_ActionsTreeView.GetItemDataForIndex<ActionOrBindingData>(m_ActionsTreeView.selectedIndex); | ||
Dispatch(item.isAction ? Commands.SelectAction(item.name) : Commands.SelectBinding(item.bindingIndex)); | ||
} |
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.
I guess this is safe, the problem here is that there seem to be two related but separate concepts of selection, one in the UI model part of the UITK controls and one in the custom model part of this repo.
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.
My only worry is that when the number of actions goes down to zero, as in deleting the last action form a map, the UI might be without selection but the State model might have a selection so they are out of sync. I suspect the loop is due to the below commands when being handled by the UI code do not skip further processing if the UI model and this custom selection model are actually equal. E.g. that else should maybe be an else if checking if the selections are not in sync.
Will check this today |
https://github.com/user-attachments/assets/fc302023-56c2-4120-bd1f-25e4ee267701 |
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, checked whether the bug still reproduces or not with custom input action window/PWA. Checked whether this could cause performance issues or other problems with selections when deleting/undoing/redoing/duplicating etc.
For context a fix has already landed for this accidentally by Simon here: #1967 (comment) I don't know if this can cause conflicts or just needs a changelog entry only, etc, just mentioning it |
Description
The asset editor could go into a UI update loop in some circumstances.
Changes made
Removed an else clause in the code which was executed when selecting an empty action map.
Testing
Manual and CI tests are successfuly.
Risk
0
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: