Table of Contents

DOShapeCircle Method

Namespace
DG.Tweening

DOShapeCircle(RectTransform, Vector2, float, float, bool, bool)

public static TweenerCore<Vector2, Vector2, CircleOptions> DOShapeCircle(this RectTransform target, Vector2 center, float endValueDegrees, float duration, bool relativeCenter = false, bool snapping = false)

Tweens a RectTransform's anchoredPosition so that it draws a circle around the given center. Also stores the RectTransform as the tween's target so it can be used for filtered operations.

IMPORTANT: SetFrom(value) requires a Vector2 instead of a float, where the X property represents the "from degrees value"

Parameters

target RectTransform
center Vector2

Circle-center/pivot around which to rotate (in UI anchoredPosition coordinates)

endValueDegrees float

The end value degrees to reach (to rotate counter-clockwise pass a negative value)

duration float

The duration of the tween

relativeCenter bool

If TRUE the center coordinates will be considered as relative to the target's current anchoredPosition

snapping bool

If TRUE the tween will smoothly snap all values to integers

Returns

TweenerCore<Vector2, Vector2, CircleOptions>