Link Search Menu Expand Document


Based on UICanvas


Presents scrollable content with optional scrollbars. Behaves similar to the UGUI Panel component.

Dependency Properties

Name Type Description
AdditionalShaderChannels AdditionalCanvasShaderChannels Enum mask of possible shader channel properties that can also be included when the Canvas mesh is created.
Alignment ElementAlignment Used to align the view relative to the layout parent region it resides in.
Alpha float Can be used to adjust the alpha color of this view and all its children. E.g. used for fade in/out animations. Is separate from and different from the background color of the view as it affects the children as well.
AutoSizeContentRegion bool Boolean indicating if the scrollable content region should be adjusted to the size of its content or not.
BlockingObjects BlockingObjects Type of objects that will block graphic raycasts.
BubbleNotifyChildLayoutChanged bool Boolean indicating if parent always should be notified when the child changes layout.
CanScrollHorizontally bool Boolean indicating if the region can be scrolled horizontally.
CanScrollVertically bool Boolean indicating if the region can be scrolled vertically.
CanvasScalerReferencePixelsPerUnit float If a sprite has ‘Pixels Per Unit’ setting, one pixel in the sprite will cover one unit in the UI.
CanvasScalerScaleFactor float Scales all children within the canvas by this factor.
ContentAlignment ElementAlignment Alignment of the content.
DecelerationRate float Determines how fast the scroll speed decelerates once the user stops scrolling.
DefaultSpriteDPI float The pixels per inch to use for sprites that have a ‘Pixels Per Unit’ setting that matches the ‘Reference Pixels Per Unit’ setting.
DisableInteractionScrollDelta float If set any interaction with child views (clicks, etc) are disabled when the specified amount of pixels has been scrolled. Used e.g. to disable items from being selected while scrolling a selectable list of items.
DisableLayoutUpdate bool Boolean indicating if automatic layout updates for this view should be disabled. When disabled the view doesn’t call UpdateLayout() when properties such as Width, Height, etc. changes.
DisableMouseWheel bool Boolean indicating if the mouse wheel is disabled.
DynamicPixelsPerUnit float The amount of pixels per unit to use for dynamically created bitmaps in the UI, such as Text.
Elasticity float Determines how elastic the viewport is when scrolling outside the bounds of the scrollable content.
EnableScriptEvents bool Boolean indicating if unity script events (Update, LateUpdate, Awake, etc) should be relayed to the view code-behind through the corresponding methods that can be overriden.
FallbackScreenDPI float The DPI to assume if the screen DPI is not known.
GameObject GameObject GameObject in the hierarchy that corresponds to the view.
HasInertia bool Boolean indicating if the should stop immediatelly when the user stops scrolling (when set to False) or if it should decelerate based on DecelerationRate.
Height ElementSize The height of the view in pixels or percents.
HorizontalScrollbarVisibility ScrollbarVisibilityMode Enum indicating the visibility mode of the horizontal scrollbar.
IgnoreFlip bool Used when doing localization override default behavior of flipping the view Right to Left or Left to Rigth.
IgnoreObject bool Boolean indicating if the view should be ignored. Ignored objects don’t run any load logic and don’t respond to property changed events.
IgnoreReversedGraphics bool Boolean indicating if graphics facing away from the raycaster should be ignored.
IsActive bool Boolean indicating if the view is active. Deactivated views deactivates corresponding game object, components, renderers and scripts.
IsVisible bool Boolean indicating if view is visible or hidden. Invisible views still take up space but aren’t interactable and have their alpha set to 0.
LoadMode LoadMode Enum flags indicating when and how the view should be loaded by the framework. Can be changed when e.g. the view is to be loaded on-demand.
Margin ElementMargin Adding margins to a view changes the size of the area in which its content resides, but it does not change the width or height of the view.
MaskContent bool Boolean indicating if any content outside the bounds of the viewport should be masked.
MatchWidthOrHeight float Setting to scale the Canvas to match the width or height of the reference resolution, or a combination.
NormalizedSortingGridSize float The normalized grid size that the canvas will split the renderable area into.
Offset ElementMargin Determines the offset of the view.
OffsetFromParent ElementMargin Offset set by a parent view. Used by views like Group to arrange children without changing their own Offset values.
OverrideHeight ElementSize Overrides regular Height value. Used to e.g. automatically size items without changing the default Height value set.
OverridePixelPerfect bool Allows for nested canvases to override pixelPerfect settings inherited from parent canvases.
OverrideSorting bool Override the sorting of canvas.
OverrideWidth ElementSize Overrides regular Width value. Used to e.g. automatically size items without changing the default Width value set.
PhysicalUnit Unit The physical unit to specify positions and sizes in.
Pivot Vector2 The pivot point of the view.
PixelPerfect bool Force elements in the canvas to be aligned with pixels. Only applies with renderMode is Screen Space.
PlaneDistance float How far away from the camera is the Canvas generated.
Position Vector3 Directly sets the local position of the view relative to parent. Position otherwise set using the Alignment and Offset properties.
RaycastBlockMode RaycastBlockMode Enum indicating if raycasts should be blocked.
ReferencePixelsPerUnit float The number of pixels per unit that is considered the default.
ReferenceResolution Vector2 The resolution the UI layout is designed for.
RenderCamera string ID of the world camera camera used when rendering the canvas.
RenderMode RenderMode Enum indicating if the canvas is in world or overlay mode.
Rotation Quaternion Rotation of the view.
Scale Vector3 Scale of the view.
ScaleFactor float Used to scale the entire canvas, while still making it fit the screen. Only applies with renderMode is Screen Space.
ScreenMatchMode ScreenMatchMode A mode used to scale the canvas area if the aspect ratio of the current resolution doesn’t fit the reference resolution.
ScrollBounds ScrollBounds Enum indicating what type of bounds the scrollable region has (Clamped, Elastic or None).
ScrollEnabled bool Boolean indicating if scrolling by the user is enabled.
ScrollSensitivity float Sets the sensitivity of the scrolling using mouse wheel or track pad.
SortingLayerID int Unique ID of the Canvas sorting layer.
SortingLayerName string Name of the Canvas sorting layer.
SortingOrder int Canvas order within a sorting layer.
TargetDisplay int For Overlay mode, display index on which the UI canvas will appear.
UiScaleMode ScaleMode Determines how UI elements in the Canvas are scaled.
UnblockDragEventsInChildren bool Boolean indicating if draggable child views shouldn’t block this scrollable region from being scrolled.
UseFastShader bool Boolean indicating if the default UI shader should be replaced by a simpler and faster one. The faster shader does not support masking and clipping.
VerticalScrollbarVisibility ScrollbarVisibilityMode Enum indicating the visibility mode of the vertical scrollbar.
Width ElementSize The width of the view in pixels or percents.
WorldCamera Camera Reference to the world camera, is automatically set if RenderCamera is set.