You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIX: InputActionReference when using FEPM (ISX-1968)
When Domain Reloads are disabled, InputActionReference instances continue to reference the "old" InputAction object from the previous PlayMode session.
This fix clears the InputAction reference when exiting PlayMode allowing it to be reloaded in the next session.
Copy file name to clipboardExpand all lines: Packages/com.unity.inputsystem/InputSystem/Actions/InputActionReference.cs
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -199,6 +199,24 @@ public static InputActionReference Create(InputAction action)
199
199
returnreference;
200
200
}
201
201
202
+
/// <summary>
203
+
/// Clears the cached <see cref="m_Action"/> field for all current <see cref="InputActionReference"/> objects.
204
+
/// </summary>
205
+
/// <remarks>
206
+
/// After calling this, the next call to <see cref="action"/> will retrieve a new <see cref="InputAction"/> reference from the existing <see cref="InputActionAsset"/> just as if
207
+
/// using it for the first time. The serialized <see cref="m_Asset"/> and <see cref="m_ActionId"/> fields are not touched and will continue to hold their current values.
208
+
///
209
+
/// This method is used to clear the Action references when exiting PlayMode since those objects are no longer valid.
0 commit comments