How to put boundaries on raised terrain?

i know how to put boundaries on the whole terrain…but if some part of the terrain will be raised,is it possible to put boundaries only on the raised part of terrain?,because i was planning to make an island and i don’t want the player to go down thru the sea…so i just want to put boundaries on the raised terrain edges.

The easiest way is to place colliders surrounding the island: create an empty object and add a box collider to it (Component->Physics->Box Collider), then adjust its dimensions to get a kind of wall - you can adjust its scale or the collider size in the Inspector to reach the desired dimensions. Drag this object to the Project view to make it a prefab, then delete it from the scene and drag the walls from the Project view to the scene, adjusting their positions and rotations to define the desired boundaries - the colliders are invisible at runtime, thus they will simply limit the movement of CharacterControllers or Rigidbodies.