The virtual resolution used when Canvas.offsetUnit is set to Pixels. Child ScreenTransform offset values are scaled by (Canvas size / basisResolution). For example, a basisResolution of (1080, 1440) on a 30x40 cm Canvas means an offset of 100 equals approximately 2.78 cm horizontally (100 / 1080 * 30). Setting this property will auto-adjust all descendant ScreenTransform offsets to preserve their visual positions. Has no effect when Canvas.offsetUnit is World.
If enabled, draws the Canvas#layoutRect bounds as a wireframe for debugging Canvas layout.
If disabled, the Component will stop enacting its behavior.
ReadonlyisReturns true if this Component is currently being destroyed. Becomes true as soon as
destruction begins via Component#destroy or destruction of its owning SceneObject,
before any OnDestroyEvent callbacks fire.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
The rectangular bounds that define the area child objects are laid out within. Each bound is defined as an offset in world units from the SceneObject's position.
ReadonlyoffsetThe scale applied to child ScreenTransform offsets when Canvas.offsetUnit is Pixels (Canvas size / Canvas.basisResolution); returns (1, 1) for World offset units or when resolution is invalid.
Controls whether child ScreenTransform offsets are in world units or virtual pixels. When set to Pixels, offsets are scaled by the Canvas size divided by Canvas.basisResolution. When set to World (default), offsets are in world units regardless of the basisResolution value. Setting this property will auto-adjust all descendant ScreenTransform offsets to preserve their visual positions.
The point about which the Canvas Rectangle will rotate. Defined as fractional coordinates of the Canvas's dimensions. e.g. (1 , 1) brings the pivot to the top right corner of the canvas. Or (0.5, 0) moves the pivot to the right by half the canvas width.
ReadonlysceneThe SceneObject this component is on.
The rendering sort order for the objects underneath this canvas.
ReadonlyuniqueThe unit for the objects underneath this canvas.
Destroys the component.
Returns the SceneObject the component is attached to.
Get size of rectangle as (width, height)
Returns the Transform this component is attached to.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
A root of the 2D ScreenTransform hierarchy in 3D space. Also used to configure unit settings of Orthographic Camera.
Remarks
SceneObjects with ScreenTransform can be placed on the Canvas, and the Canvas can be sized and placed anywhere in 3D space. It is like a painter’s canvas for ScreenTransforms.
See
Canvas guide. Screen Transform Overview guide.
Example