The original fix added propertyPath to the SerializedInputAction/Binding Equals method, but it retrieved the value directly from the cached SerializedProperty. In this scenario (deleting last ActionMap) the underlying Property is disposed and causes this exception. Instead, this change saves propertyPath to a separate string during initialization when the SerializedProperty is known to be valid.
Changes made
Added a propertyPath property to SerializedInputAction/Binding which holds the value retrieved from wrappedProperty.
This string is used during Equals() method.
Notes
I verified this change doesn't break https://jira.unity3d.com/browse/ISX-1873 but there's still a small concern about caching propertyPath. If the it changes in the underlying Property it won't be updated here. But I don't think this is a real problem given how this struct is used.
Checklist
Before review:
[x] Changelog entry added.
Explains the change in Changed, Fixed, Added sections.
For API change contains an example snippet and/or migration example.
FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
FogBugz is marked as "Resolved" with next release version correctly set.
Description
Fixes regression introduced with this bug fix: https://github.com/Unity-Technologies/InputSystem/pull/1861
The original fix added
propertyPath
to the SerializedInputAction/Binding Equals method, but it retrieved the value directly from the cached SerializedProperty. In this scenario (deleting last ActionMap) the underlying Property is disposed and causes this exception. Instead, this change savespropertyPath
to a separate string during initialization when the SerializedProperty is known to be valid.Changes made
Added a
propertyPath
property to SerializedInputAction/Binding which holds the value retrieved fromwrappedProperty
. This string is used during Equals() method.Notes
I verified this change doesn't break https://jira.unity3d.com/browse/ISX-1873 but there's still a small concern about caching
propertyPath
. If the it changes in the underlying Property it won't be updated here. But I don't think this is a real problem given how this struct is used.Checklist
Before review:
Changed
,Fixed
,Added
sections.([case %number%](https://issuetracker.unity3d.com/issues/...))
.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.