Skip to Main Content

BTD_Mod_Helper​.Extensions​.RectTransformExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

RectTransformExt Class

Extensions for RectTransforms

public static class RectTransformExt

Inheritance System.Object  RectTransformExt

Methods

RectTransformExt.ContainsScreenPoint(this RectTransform, Vector2) Method

public static bool ContainsScreenPoint(this RectTransform rect, Vector2 screenPoint);

Parameters

rect UnityEngine.RectTransform

screenPoint UnityEngine.Vector2

Returns

System.Boolean

RectTransformExt.FullyContains(this RectTransform, RectTransform) Method

Checks whether an inner rect transform is fully contained within an outer rect transform

public static bool FullyContains(this RectTransform outer, RectTransform inner);

Parameters

outer UnityEngine.RectTransform

outer rect

inner UnityEngine.RectTransform

inner rect

Returns

System.Boolean
whether inner is fully contained within outer

RectTransformExt.MousePositionLocal(this RectTransform, bool) Method

Gets the mouse position as a local position within this rectangle

public static Vector2 MousePositionLocal(this RectTransform rect, bool clamp=false);

Parameters

rect UnityEngine.RectTransform

this

clamp System.Boolean

whether to clamp the position to within the bounds of this rect

Returns

UnityEngine.Vector2

RectTransformExt.OverlapsWith(this RectTransform, RectTransform) Method

Checks whether a rect overlaps with another rect

public static bool OverlapsWith(this RectTransform a, RectTransform b);

Parameters

a UnityEngine.RectTransform

rect

b UnityEngine.RectTransform

rect

Returns

System.Boolean
whether rects overlap

RectTransformExt.ScreenPointToLocalPoint(this RectTransform, Vector2) Method

public static Vector2 ScreenPointToLocalPoint(this RectTransform rect, Vector2 screenPoint);

Parameters

rect UnityEngine.RectTransform

screenPoint UnityEngine.Vector2

Returns

UnityEngine.Vector2

To learn how to download BTD Mod Helper and install mods, click here