@@ -663,7 +663,7 @@ public void EndTouch(int touchId, Vector2 position, float pressure, Vector2 delt
663663 public void CancelTouch ( int touchId , Vector2 position , Vector2 delta = default , bool queueEventOnly = false ,
664664 Touchscreen screen = null , double time = - 1 , double timeOffset = 0 )
665665 {
666- SetTouch ( touchId , TouchPhase . Canceled , position , delta , queueEventOnly : queueEventOnly , screen : screen , time : time , timeOffset : timeOffset ) ;
666+ SetTouch ( touchId , TouchPhase . Canceled , position , 1 , delta , queueEventOnly : queueEventOnly , screen : screen , time : time , timeOffset : timeOffset ) ;
667667 }
668668
669669 public void CancelTouch ( int touchId , Vector2 position , float pressure , Vector2 delta = default , bool queueEventOnly = false ,
@@ -1005,7 +1005,9 @@ internal void SimulateDomainReload()
10051005 // have no proper way of simulating domain reloads ATM. So we directly call various
10061006 // internal methods here in a sequence similar to what we'd get during a domain reload.
10071007
1008- InputSystemEditorInitializer . s_SystemObject . OnBeforeSerialize ( ) ;
1008+ // Some editor test runs may not have created the system object yet.
1009+ // Guard against it so domain reload simulation doesn't NRE (NullReferenceException).
1010+ InputSystemEditorInitializer . s_SystemObject ? . OnBeforeSerialize ( ) ;
10091011 InputSystemEditorInitializer . s_SystemObject = null ;
10101012 // InputSystem.InitializeInEditor(runtime);
10111013 }
0 commit comments