-
Notifications
You must be signed in to change notification settings - Fork 317
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: Errors are thrown when assigning Input Actions Asset that contains a custom InputProcessor or InputBindingComposite as Project-wide Input Actions (ISXB-856) #1958
Conversation
2b95f08
to
db17eb0
Compare
c1d97f6
to
7e1682b
Compare
…nputBindingComposite
700e766
to
486923b
Compare
Packages/com.unity.inputsystem/InputSystem/Actions/IInputInteraction.cs
Outdated
Show resolved
Hide resolved
RegisterCustomTypes(); | ||
} | ||
|
||
void RegisterCustomTypes(Type[] types) |
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.
Can we make sure to add a ProfilerMarker
to track how long this takes?
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.
good idea I will add that
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.
yeah, that sounds good. @chris-massie are you concerned with startup times with this change?
…action.cs Co-authored-by: Chris Massie <[email protected]>
…thub.com/Unity-Technologies/InputSystem into isxb-856-fix-editor-project-wide-actions
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.
Good improvement, LGTM!
fixed changelog order
Description
The static registration of custom processor, interaction, BindingComposite could lead to undefined behavior for project action if the static initiation doesn't occur in the right order which is by design hard to control.
Changes made
Add reflection to load custom InputProcessor, IInputInteraction and InputBindingComposite during the InputManage initialisation.
Added a profiler marker for this step.
Testing
local test + bug project
Risk
It add some time in the initialisation and register all derived type which was not the case before.
We may encounter some name collision and he doesn't have a way to disable the automatic discovery.
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: