So I have my player that can do a single/double jump and can jump again after touching the “ground” and I consider “ground” anything on the ground layer. In my game I olso have platforms with one way collider (so i can jump from under the platform on top) and the platforms are olso ground so I can land/jump from them. To check if I touch the ground I use a raycast2D
Physics2D.Raycast(groundCheck.position, Vector2.down, groundCheckDist, whatIsGround);
where groundCheck is a GO that I set in inspector
As you can see the raycast is very small but it still collids with the platform when jump on it so the player is cosiderd to be grounded so I can jump again. And if I have multiple platforms I can basiclly fly through all of them and I don’t want that