Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ClampToBounds

Clamps the position and size of the RectInt to the given bounds.
Read time 1 minuteLast updated 9 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

ClampToBounds(RectInt)

Clamps the position and size of the
RectInt
to the given bounds.
public void ClampToBounds(RectInt bounds)

Parameters

bounds

Bounds to clamp the
RectInt
.

ClampToBounds(RectInt)

Clamps the position and size of the
RectInt
to the given bounds.
public void ClampToBounds(in RectInt bounds)

Parameters

bounds

Bounds to clamp the
RectInt
.