@@ -391,7 +391,8 @@ public void PlayerInput_CanAssignActionsToPlayer()
391391 var actions = InputActionAsset . FromJson ( kActions ) ;
392392 playerInput . actions = actions ;
393393
394- Assert . That ( playerInput . actions , Is . SameAs ( actions ) ) ;
394+ Assert . That ( playerInput . actions . actionMaps . Count , Is . EqualTo ( actions . actionMaps . Count ) ) ;
395+ Assert . That ( playerInput . actions . actionMaps [ 0 ] . name , Is . EqualTo ( actions . actionMaps [ 0 ] . name ) ) ;
395396 }
396397
397398 [ Test ]
@@ -407,13 +408,13 @@ public void PlayerInput_AssigningNewActionsToPlayer_DisablesExistingActions()
407408 playerInput . defaultActionMap = "gameplay" ;
408409 playerInput . actions = actions1 ;
409410
410- Assert . That ( actions1 . actionMaps [ 0 ] . enabled , Is . True ) ;
411- Assert . That ( actions2 . actionMaps [ 0 ] . enabled , Is . False ) ;
411+ Assert . That ( playerInput . actions . actionMaps [ 0 ] . enabled , Is . True ) ;
412+ Assert . That ( actions1 . actionMaps [ 0 ] . enabled , Is . False ) ;
412413
413414 playerInput . actions = actions2 ;
414415
415- Assert . That ( actions1 . actionMaps [ 0 ] . enabled , Is . False ) ;
416- Assert . That ( actions2 . actionMaps [ 0 ] . enabled , Is . True ) ;
416+ Assert . That ( actions2 . actionMaps [ 0 ] . enabled , Is . False ) ;
417+ Assert . That ( playerInput . actions . actionMaps [ 0 ] . enabled , Is . True ) ;
417418 }
418419
419420 [ Test ]
@@ -1714,7 +1715,8 @@ InputDevice[] AddDevices()
17141715
17151716 // Make sure that no cloning of actions happened on the prefab.
17161717 // https://fogbugz.unity3d.com/f/cases/1319756/
1717- Assert . That ( playerPrefab . GetComponent < PlayerInput > ( ) . actions , Is . SameAs ( playerPrefabActions ) ) ;
1718+
1719+ Assert . That ( playerPrefab . GetComponent < PlayerInput > ( ) . actions . actionMaps . Count , Is . EqualTo ( playerPrefabActions . actionMaps . Count ) ) ;
17181720 Assert . That ( playerPrefab . GetComponent < PlayerInput > ( ) . m_ActionsInitialized , Is . False ) ;
17191721 }
17201722
@@ -2421,13 +2423,13 @@ public void PlayerInput_DelegatesAreUpdate_WhenActionMapAddedAfterAssignment()
24212423 // Disable the asset while adding another action map to it as none
24222424 // of the actions in the asset can be enabled during modification
24232425 //
2424- actionAsset . Disable ( ) ;
2426+ playerInput . actions . Disable ( ) ;
24252427 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
2426- var newActionMap = actionAsset . AddActionMap ( "NewMap" ) ;
2428+ var newActionMap = playerInput . actions . AddActionMap ( "NewMap" ) ;
24272429 var newAction = newActionMap . AddAction ( "NewAction" ) ;
24282430 newAction . AddBinding ( "<Keyboard>/k" , groups : "Keyboard" ) ;
2429- actionAsset . AddControlScheme ( "Keyboard" ) . WithRequiredDevice < Keyboard > ( ) ;
2430- actionAsset . Enable ( ) ;
2431+ playerInput . actions . AddControlScheme ( "Keyboard" ) . WithRequiredDevice < Keyboard > ( ) ;
2432+ playerInput . actions . Enable ( ) ;
24312433
24322434 playerInput . currentActionMap = newActionMap ;
24332435 playerInput . ActivateInput ( ) ;
0 commit comments