Physics.OverlapSphere error

I turned
grounded = Physics2D.OverlapCircle(groundCheck.position, groundedRadius, whatIsGround);
To this:

grounded = Physics.OverlapSphere(groundCheck.position, groundedRadius, whatIsGround);

And I got an error Cannot implicitly convert type UnityEngine.Collider[]' to bool’
What’s the problem?

You should always check out the API docs to see if you are using a function right

http://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html

The return type of OverlapSphere is a Collider (array) so it doesn’t convert to boolean nicely.

grounded = Physics.OverlapSphere(groundCheck.position, groundedRadius, whatIsGround).Length > 0;

might work better