Anything with a Rigidbody can float on the ocean, lakes and rivers. Waves rock it and rivers carry it along. A wake spreads out behind the player as they wade through the water. Foam rings form wherever things touch the surface.

Boats and crates floating in the demo's lagoon.

Boats and crates floating in the demo's lagoon.

Ready-made floating props

Prefabs/Buoyant has four props that float as they are:

Prefab What it is
PF_BuoyantBoat A boat
PF_BuoyantCrate A crate
PF_BuoyantWoodenBox A wooden box
PF_BuoyantAnchoredShip A heavy ship that bobs and rocks in place. Its Rigidbody constraints stop it drifting or turning.

Drag one into the water and press Play.

Make your own object float

Select the object, or several objects. Then use one of these:

Press Play. The object floats level.

If the object doesn't have a Rigidbody, Make Buoyant adds one. It places four pontoons on the object's corners and sets a lift and damping that suit the object. Remove Buoyancy is in the same menus and takes the Buoyancy component off again. It removes the Rigidbody too, if the Rigidbody was added with Buoyancy. One Ctrl+Z undoes it for every selected object.

For prefabs in the Project window, right-click them and pick one of these:

The object needs a collider, or it falls through the ground. The top of the Buoyancy inspector lists anything else that stops it floating. A Mesh Collider that isn't Convex gets a Make Convex button there.

Pontoons (01 - Pontoons)

Each pontoon is a sphere that the water pushes up. Use at least three, spread out under the hull, so the object stays level.