# WatermarkOptions (/zh-CN/api-reference/rtc/unity/class-watermarkoptions)
> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).
```csharp
public class WatermarkOptions
{
public WatermarkOptions()
{
visibleInPreview = false;
positionInLandscapeMode = new Rectangle(0, 0, 0, 0);
positionInPortraitMode = new Rectangle(0, 0, 0, 0);
watermarkRatio = new WatermarkRatio();
mode = WATERMARK_FIT_MODE.FIT_MODE_COVER_POSITION;
}
public WatermarkOptions(bool visibleInPreview, Rectangle positionInLandscapeMode,
Rectangle positionInPortraitMode, WatermarkRatio ratio, WATERMARK_FIT_MODE mode)
{
this.visibleInPreview = visibleInPreview;
this.positionInLandscapeMode = positionInLandscapeMode ?? new Rectangle();
this.positionInPortraitMode = positionInPortraitMode ?? new Rectangle();
this.watermarkRatio = ratio ?? new WatermarkRatio();
this.mode = mode;
}
public bool visibleInPreview { set; get; }
public Rectangle positionInLandscapeMode { set; get; }
public Rectangle positionInPortraitMode { set; get; }
public WatermarkRatio watermarkRatio { set; get; }
public WATERMARK_FIT_MODE mode { set; get; }
public int zOrder { set; get; }
}
```
用于设置要添加的水印图像的相关配置项。
## 属性 [#属性]
水印是否在本地预览视图中可见:
- true: (默认)水印在本地预览视图中可见。
- false: 水印在本地预览视图中不可见。
水印的适配模式为 FIT_MODE_COVER_POSITION 时,用于设置横屏模式下水印图片的区域。详见 [Rectangle](/zh-CN/api-reference/rtc/unity/class-rectangle)。
水印的适配模式为 FIT_MODE_COVER_POSITION 时,用于设置竖屏模式下水印图片的区域。详见 [Rectangle](/zh-CN/api-reference/rtc/unity/class-rectangle)。
水印的适配模式为 FIT_MODE_USE_IMAGE_RATIO 时,该参数可设置缩放模式下的水印坐标。详见 [WatermarkRatio](/zh-CN/api-reference/rtc/unity/class-watermarkratio)。
水印的适配模式。详见 [WATERMARK_FIT_MODE](/zh-CN/api-reference/rtc/unity/enum-watermarkfitmode)。
水印图像的图层顺序,默认值为 0。