void TryDisablingPlatforms() { if (m_ControlledCollider.IsGrounded() && m_CanPassThroughOneWayPlatforms && GetDirInput("Move").m_Direction == DirectionInput.Direction.Down) { OneWayPlatform oneWayPlatform = m_ControlledCollider.GetGroundedInfo().GetGroundTransform().GetComponentInChildren <OneWayPlatform>(); if (oneWayPlatform) { oneWayPlatform.DisableForObject(m_CharacterController.GetComponent <Collider>()); } } }