Project requirements, water dimensions, camera projection, and initial setup.
Requirements
- Unity 6 and URP with the 2D Renderer.
- Orthographic gameplay camera facing positive Z with zero rotation.
- Compute shader support for wave simulation.
Create a Water Source
- In Unity, choose Tools → Modern Platformer Water → Create water….
- Assign the gameplay camera, set the dimensions, and click Create water source.
- Add Water Object to each SpriteRenderer that should interact with the water.
Dimensions and camera
Water Source · Water & camera setup · Dimensions and camera
| Setting | Effect |
|---|---|
| Width | Reservoir width before Transform scale; changes the physical X bounds. |
| Underwater depth | Depth below Y0 in physical Y units; moves the bottom without changing virtual Z. |
| Waterline height | World Y offset added to Transform Y to define physical waterline Y0. |
| Surface reach | Reservoir length in virtual Z world units. Normalized sprite depth spans 0 to this value. |
| Surface vertices X | 32–2,049 vertices across the water width. Enter 0 for automatic resolution. |
| Surface vertices Z | 4–257 vertices from front to back. Enter 0 for automatic resolution. A manual count on either axis replaces local mesh refinement. |
| Perspective row spacing | Use the source perspective distance to preserve front detail and spread rows toward the rear. Reduces render geometry independently of the solver. |
| Camera | Orthographic gameplay camera that defines water perspective. Scene view uses the assigned camera for its water preview. |
More dimensions and camera settings
| Setting | Effect |
|---|---|
| Keep original size at | Far keeps the far waterline fixed and projects near objects towards the camera. Front keeps the front waterline fixed and projects the far waterline away. |
| Custom size-lock depth | Custom size-lock lane: 0 is front, 1 is far. This lane keeps its authored XY position and size. |
| Perspective distance | Virtual camera distance in world units. Larger values reduce parallax and perspective. |
| Width measured at | Chooses which surface edge the authored Width describes. Near and far edge widths can differ under perspective. |
| Camera framing | Follow Camera keeps the neutral line at a chosen height in view with dynamic top/underside transitions. Scene Height fixes it in world Y. |
| Waterline on screen | Neutral height in the gameplay camera view: 0 = bottom, 0.5 = center, 1 = top. Follows movement and zoom without moving the physical waterline. |
| Framing height | World Y of the projection's neutral line. A flat surface at this height is edge-on. Below it shows the top; above it shows the underside. |
| Sorting layer | Water sorting layer; actors use this layer when sorting override is enabled. |
| Water order | Base water sorting order; bottom is below it, actors render above it with optical composition. |
| Fit to camera | Crop the visible water mesh to the camera while retaining the source bounds and simulation domain. |
| Shared settings preset | Shared source settings. Enable local overrides to customize this body independently. |
| Animate in editor | Animate surface sprites while editing; projection still follows the gameplay camera. |
Coordinates
X is width along the gameplay plane. Y is vertical height and depth. Virtual Z measures the distance from the near shore to the far shore. A Water Object on a virtual depth lane keeps its gameplay Transform.
Scene overrides
In example scenes, Scene Water Controls can override settings on several Water Sources. Edit or disable an override there before tuning one source separately.
