16 / 18
DEVELOPER REFERENCE
16 / 18

API reference

Surface methods, effect signatures, editable settings groups and notifications.

English guideSource: Unity 6000.3.13f1 · URP 17.3.011 October 2026

Reference for the guide's inspected package source. The runtime namespace and assembly are ERAGANX.WaterReflection2D. See complete C# scripts for setup and lifecycle context.

Surface and capture methods#

Public memberUse
SetReflectionEnabled(bool)Toggle this surface without deleting its configuration.
SetSourceCamera(Camera)Assign camera and update capture configuration.
SetSurfaceSize(Vector2)Set destination-plane width/height.
SetSurfaceShape(Sprite, float = 0.001f)Set alpha silhouette/cutoff. Null restores a rectangle; no automatic resize.
SetOutputSorting(int, int)Output sorting-layer ID/order. Lightweight retains source sorting.
SetReflectionMode(ReflectionMode)Planar, LightweightSprite, Cached, Hybrid or Mirror.
SetMirrorOrientation(enum)ReflectionMirrorOrientation.Horizontal or Vertical; vertical applies to Mirror.
SetVisualStyle(enum, int = 32)ReflectionVisualStyle.Smooth or PixelArt, with Pixels Per Unit.
SetReflectionQuality(enum)Apply Low/Medium/High/Ultra numeric defaults; Custom keeps individual values.
SetReflectionUpdateRate(float)Cap eligible captures/second; zero means every eligible frame.
ApplyReflectionPreset(preset)Copy reusable groups while retaining scene bindings.
RefreshCachedReflection() / RequestRefresh()Request fresh cached/static or live content.
NotifySettingsChanged()Sanitize/inform renderer after direct structural changes.
TryValidateConfiguration(out diagnostic)Return support status and ReflectionDiagnostic, without inspecting rendered pixels.

Use references to actual surfaces rather than searching for or creating a manager every frame.

Effect methods#

Public methodArgument order / behavior
SetVisualEffectsEnabled(bool)Master optional shader effects.
SetReflectionStrength(float) / SetReflectionOpacity(float)Base visibility multipliers, each 0–1.
SetReflectionColor(Color)RGBA multiplier; enables Color/Visual Effects.
SetReflectionTint(Color, float)Tint color and 0–1 strength; enables tint/effects.
SetReflectionBrightness(float) / SetReflectionSaturation(float)Brightness 0–4; saturation 0–2.
SetReflectionOffset(Vector2)Local-plane sampling displacement.
SetWaves(bool, float, float, float, Vector2)Enabled, amplitude, speed, frequency, direction.
SetSecondaryWave(bool, float, float, float, Vector2)Same argument order as primary waves; independently enabled.
SetWaveSpeed(float) / SetWaveDistortion(float)Primary speed/amplitude. Distortion also updates WavesEnabled.
SetRipples(bool, float, float, float, float)Enabled, amplitude, frequency, speed, scale.
SetRipplePreset(enum)ReflectionRipplePreset.Subtle or Strong.
SetReflectionBlur(bool, float, enum = LowCost)Enabled, radius in texels, ReflectionBlurQuality.
SetReflectionFade(bool, bool, float, float, float = 1)Vertical, horizontal, start, end, intensity. Copies range to both axes.
SetReflectionEdgeSoftness(bool, float)Rectangular-edge blend enable and normalized softness.
NotifyVisualEffectsChanged()Sanitize direct Effects edits without invalidating scene capture.

Editable settings groups#

GroupScope
CaptureRegion, IncludedLayers, ExcludedLayers, ObjectFilter, SelectedRenderers, SortingLayerIds, RendererIndex, NearClip, FarClip, BackgroundColor.
EffectsVisibility, appearance, distortion, blur, fades and edge settings.
QualityTier/numeric resolution settings, texture cap, PPU and pixel flags.
OptimizationUpdate rate, visibility skipping, sharing, preview, cache policy/interval and Hybrid layers.

Use the appropriate notification after direct field changes. Batch structural edits with NotifySettingsChanged; use NotifyVisualEffectsChanged for display effects only. The shape setter can reuse a capture; change size separately when needed.

Diagnostics and events#

Read Diagnostic. Subscribe to DiagnosticChanged(Action<ReflectionDiagnostic>) and ReflectionUpdated(Action<WaterReflectionSurface>), then unsubscribe when the listener is disabled.

The update event reports a completed displayed capture. Configuration acceptance and completed captures do not establish correct image content or performance. Avoid unrelated nested rendering inside capture callbacks.

Adapted from the supplied guide · PDF pages 38–39.View source guide ↗
Keep creating.ERAGAN STUDIO.

Search a topic, setting or method across all package guides.