Companions can dress up a swimsuit in places declared for swimsuit change by map TileData property
TouchAction with value
ChangeIntoSwimsuit. The value
ChangeOutOfSwimsuit in the same property
changes your companion back to theirs regular dress.
Swimsuit spritesheet for companions are defined by
Characters/<NpcName>_Beach resource asset (added in SDV 1.5).
For custom companions you can add and load this resource with Content Patcher.
Also with Content Patcher you can edit the existing if you need it.
Companions can swim in the pool or in another water place which allows swimming. ,
To make safe swim on and swim of for companions on custom maps with the place for swimming be sure you have defined
TouchAction property in the TileData.
PoolExit must be defined on the map, otherwise companion can't swim-on or swim-off
when they enters or leaves the pool.