@@ -97,27 +97,21 @@ private void TestRigidBody2D()
9797 Assert . True ( serverClientPlayerNetworkRigidbody2d . WasKinematicBeforeSpawn ) ;
9898 Assert . True ( clientServerPlayerNetworkRigidbody2d . WasKinematicBeforeSpawn ) ;
9999
100- // Validate kinematic settings after spawn
101- var serverLocalPlayerRigidbody2d = m_ServerNetworkManager . LocalClient . PlayerObject . GetComponent < Rigidbody2D > ( ) ;
102- var clientLocalPlayerRigidbody2d = m_ClientNetworkManagers [ 0 ] . LocalClient . PlayerObject . GetComponent < Rigidbody2D > ( ) ;
103- var serverClientPlayerRigidbody2d = m_PlayerNetworkObjects [ m_ServerNetworkManager . LocalClientId ] [ m_ClientNetworkManagers [ 0 ] . LocalClientId ] . GetComponent < Rigidbody2D > ( ) ;
104- var clientServerPlayerRigidbody2d = m_PlayerNetworkObjects [ m_ClientNetworkManagers [ 0 ] . LocalClientId ] [ m_ServerNetworkManager . LocalClientId ] . GetComponent < Rigidbody2D > ( ) ;
105-
106100 var isOwnerAuthority = m_AuthorityMode == NetworkTransformRigidBodyTestComponent . AuthorityModes . Owner ;
107101 if ( isOwnerAuthority )
108102 {
109103 // can commit player has authority and should have a kinematic mode of false (or true in case body was already kinematic).
110- Assert . True ( ! serverLocalPlayerRigidbody2d . isKinematic ) ;
111- Assert . True ( ! clientLocalPlayerRigidbody2d . isKinematic ) ;
112- Assert . True ( serverClientPlayerRigidbody2d . isKinematic ) ;
113- Assert . True ( clientServerPlayerRigidbody2d . isKinematic ) ;
104+ Assert . True ( ! serverLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
105+ Assert . True ( ! clientLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
106+ Assert . True ( serverClientPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
107+ Assert . True ( clientServerPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
114108 }
115109 else
116110 {
117- Assert . True ( ! serverLocalPlayerRigidbody2d . isKinematic ) ;
118- Assert . True ( clientLocalPlayerRigidbody2d . isKinematic ) ;
119- Assert . True ( ! serverClientPlayerRigidbody2d . isKinematic ) ;
120- Assert . True ( clientServerPlayerRigidbody2d . isKinematic ) ;
111+ Assert . True ( ! serverLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
112+ Assert . True ( clientLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
113+ Assert . True ( ! serverClientPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
114+ Assert . True ( clientServerPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
121115 }
122116 }
123117#endif
0 commit comments