-
Notifications
You must be signed in to change notification settings - Fork 318
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
FIX: UI generation of custom interactions of action properties when it rely on OnGUI callback (ISXB-886) #1957
Conversation
…hen it rely on OnGUI callback
…ction properties. The new selected value was lost when saving.
It seems like I lose focus every time I interact with these fields from the custom interactions, is this a bug or something the user script lacks? I'm leaning towards a bug 😅 Also, added @ekcoh for code review, feel free to add someone else if you're busy |
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.
Updating status
good catch I missed those ones, processor editor are also InputParameterEditor, I only checked Interaction. |
|
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.
Code changes LGTM. Do I understand it correctly that the focus issues are still an open issue? It sounds like that might need some attention. I am approving this now given that the code changes looks good but there might be side effects as called out by Paulius?
We've discussed this with Benoit and decided to make a separate bug for that issue. I've since noticed it also affects some non custom interactions such as the multi tap one, but it is not as a big of a problem there as the custom ones could be. (Bug link: https://jira.unity3d.com/browse/ISX-2074) |
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 that extisting interactions/processors function normally and that the custom ones show up correctly as well.
…gui-interaction-inspector
Description
The action editor was not displaying the content of custom interactions when it's done in IMGUI. ISXB-886
jira : https://jira.unity3d.com/browse/ISXB-886
When no custom editor exist the generated UI for enum doesn't work well. The value is lost when save + error in the console.
Changes made
Added an IMGUIContainer to handle IMGUI UI.
Before the change :
After the change :
Also added some early exit when IMGUI is not the default to prevent to UI to be drawn twice.
Also fixed the generation of UI for enum which loosed the value when saved. Now it use the index instead of trying to convert the string to the value.
Testing
Tested the repro project which contain IMGUI UI and buildin interaction in UITK + custom interactions without editor
Risk
Only in editor, should be safe
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: