PhysicsModule2d not working?,Physics2dModule not working?

I’m trying to make a simple 2d space shooter, and I want to have a simple laser as the player’s weapon. I’ve found numerous tutorials and scripts for this, but most of them use RaycastHit2d and physics2d, but those both throw up errors saying they could not be found. Is my unity install corrupted/incomplete? Have I possible forgotten a step? I can’t find anyone else with this issue, and I can’t find anything saying that I need to download something else to use these things. Thanks in advance for any help.

It looks like the documentation is a little misleading. While RaycastHit2D is in UnityEngine.Physics2DModule, it is only in the UnityEngine namespace. Have you tried: using UnityEngine; instead?