CanvasControllerExtensions

public static class CanvasControllerExtensions;

Description

CanvasController extension methods.

Properties
None
Methods
CanvasRectTransform The canvas controller’s canvas’ RectTransform component.
CanvasSize The canvas controller’s canvas’ size.
CanvasWorldBounds The canvas controller’s canvas’ bounds in world space.
CanvasWorldCorners The canvas controller’s canvas’ corners in world space.
CanvasWorldSize The canvas controller’s canvas’ size in world space. This is the difference between the top right world corner and the bottom left world corner.
IsScreenSpace Is the canvas controller’s canvas in screen space?
OffScreenBottomContentPosition The position for the canvas controller’s content that will position it off the bottom of the screen.
OffScreenLeftContentPosition The position for the canvas controller’s content that will position it off the left of the screen.
OffScreenRightContentPosition The position for the canvas controller’s content that will position it off the right of the screen.
OffScreenTopContentPosition The position for the canvas controller’s content that will position it off the top of the screen.
OnScreenContentPosition The on-screen position for the canvas controller’s content.

CanvasRectTransform

public static RectTransform CanvasRectTransform(this CanvasController canvasController);

Description

The canvas controller’s canvas’ RectTransform component.

This is equivalent to calling canvasController.canvas.GetComponent().

See also:

CanvasController.canvas


CanvasSize

public static Vector2 CanvasSize(this CanvasController canvasController);

Description

The canvas controller’s canvas’ size.

This is equivalent to calling canvasController.CanvasRectTransform().rect.size.

See also:

CanvasController.canvas


CanvasWorldBounds

public static Bounds CanvasWorldBounds(this CanvasController canvasController);

Description

The canvas controller’s canvas’ bounds in world space.

You might use this method when doing canvas-related world space calculations. For example, Canvas Flow uses this internally to position canvas controller’s next to one another in world space.

See also:

CanvasController.canvas


CanvasWorldCorners

public static Vector3[] CanvasWorldCorners(this CanvasController canvasController);

Description

The canvas controller’s canvas’ corners in world space.

You might use this method when doing canvas-related world space calculations. For example, Canvas Flow uses this internally to position canvas controller’s next to one another in world space.

See also:

CanvasController.canvas


CanvasWorldSize

public static Vector2 CanvasWorldSize(this CanvasController canvasController);

Description

The canvas controller’s canvas’ size in world space. This is the difference between the top right world corner and the bottom left world corner.

You might use this method when doing canvas-related world space calculations. For example, Canvas Flow uses this internally to position canvas controller’s next to one another in world space.

See also:

CanvasController.canvas


IsScreenSpace

public static bool IsScreenSpace(this CanvasController canvasController);

Description

Is the canvas controller’s canvas in screen space?

Returns true if the canvas controller’s canvas is in a screen space render mode.

See also:

CanvasController.canvas


OffScreenBottomContentPosition

public static Vector3 OffScreenBottomContentPosition(this CanvasController canvasController);

Description

The position for the canvas controller’s content that will position it off the bottom of the screen.

This is calculated using the height of the canvas controller’s canvas. You might use this method when animating or moving a canvas controller’s content to or from the bottom of the screen.

See also:

CanvasController.ContentPosition

CanvasController.content

CanvasController.canvas


OffScreenLeftContentPosition

public static Vector3 OffScreenLeftContentPosition(this CanvasController canvasController);

Description

The position for the canvas controller’s content that will position it off the left of the screen.

This is calculated using the width of the canvas controller’s canvas. You might use this method when animating or moving a canvas controller’s content to or from the left of the screen.

See also:

CanvasController.ContentPosition

CanvasController.content

CanvasController.canvas


OffScreenRightContentPosition

public static Vector3 OffScreenRightContentPosition(this CanvasController canvasController);

Description

The position for the canvas controller’s content that will position it off the right of the screen.

This is calculated using the width of the canvas controller’s canvas. You might use this method when animating or moving a canvas controller’s content to or from the right of the screen.

See also:

CanvasController.ContentPosition

CanvasController.content

CanvasController.canvas


OffScreenTopContentPosition

public static Vector3 OffScreenTopContentPosition(this CanvasController canvasController);

Description

The position for the canvas controller’s content that will position it off the top of the screen.

This is calculated using the height of the canvas controller’s canvas. You might use this method when animating or moving a canvas controller’s content to or from the top of the screen.

See also:

CanvasController.ContentPosition

CanvasController.content

CanvasController.canvas


OnScreenContentPosition

public static Vector3 OnScreenContentPosition(this CanvasController canvasController);

Description

The on-screen position for the canvas controller’s content.

You might use this method when animating or moving a canvas controller’s content. This is always Vector3.zero.

See also:

CanvasController.ContentPosition

CanvasController.content

CanvasController.canvas

CanvasController.camera