This is a general overview of how to approach the problem. I haven't included any code, but hopefully it's enough to answer your question.
A good way to approach this may be to use
Physics.BoxCastAll(). BoxCast is similar to Raycast but, as the name suggests, uses a box instead of a ray.
First, you will need some type of collider on your units that the BoxCast can detect. If you're just using the collider to detect mouse interaction, you can use a box collider with "Is Trigger" checked. For performance reasons, you should put these colliders on their own layer and use a layer mask with the box cast.
The tricky part would probably be converting the 2D box drawn by the mouse into a world-space 3D box. One way to do this may be to find each corner of the box in screen space, convert the corners to world space, then calculate the center and extents of the box based on these corners. I think that you could just use the camera's rotation for the box's rotation, but am not 100% certain as I haven't tried this before. EDIT: As noted by DMGregory in the comments, you will probably also need to account for the camera frustum, which makes things trickier and may require using multiple box casts, or instead calling
Physics.OverlapBox() multiple times for different distances.
If you go with this setup, you can just use a regular raycast for regular single-click selection. That's also a lot simpler than the highly complex selection manager from your link.