Table of Contents

Class CanvasExtensions

Namespace
MonkeyLoader.Resonite.UI
Assembly
MonkeyLoader.Resonite.Integration.dll

Contains helpful methods to deal with UIX FrooxEngine.UIX.Canvases, their FrooxEngine.UIX.RectTransforms, and related types.

public static class CanvasExtensions
Inheritance
CanvasExtensions
Inherited Members

Methods

Contains(BoundingBox2D, float2)

Determines whether the given point is within this Elements.Core.BoundingBox2D.

public static bool Contains(this BoundingBox2D boundingBox, float2 point)

Parameters

boundingBox BoundingBox2D

The bounding box to determine inclusion in.

point float2

The point to determine inclusion for.

Returns

bool

true if the point is inside this Elements.Core.BoundingBox2D; otherwise, false.

GetCanvasBounds(RectTransform)

Gets this FrooxEngine.UIX.RectTransform's global compute rect in the FrooxEngine.UIX.Canvas's Unit Scale.

public static BoundingBox2D GetCanvasBounds(this RectTransform rectTransform)

Parameters

rectTransform RectTransform

The rect transform to determine the canvas unit scale bounds of.

Returns

BoundingBox2D

The 2D bounding box of this FrooxEngine.UIX.RectTransform within its FrooxEngine.UIX.Canvas's FrooxEngine.Slot's local space.

GetGlobalBounds(RectTransform)

Gets this FrooxEngine.UIX.RectTransform's global compute rect's Elements.Core.BoundingBox in the global space.

public static BoundingBox GetGlobalBounds(this RectTransform rectTransform)

Parameters

rectTransform RectTransform

The rect transform to determine the global bounds of.

Returns

BoundingBox

The 3D bounding box of this FrooxEngine.UIX.RectTransform within the global space.

Reset(RectTransform)

Resets this FrooxEngine.UIX.RectTransform to the default values.

public static void Reset(this RectTransform rectTransform)

Parameters

rectTransform RectTransform

The rect transform to reset.