用户工具

站点工具


侧边栏

script:unityengine:classes:canvas:canvas

Canvas 画布

class in UnityEngine/Inherits from: Behaviour

Description 描述

Element that can be used for screen rendering.

元素可用于屏幕呈现。

Elements on a canvas are rendered AFTER scene rendering, either from an attached camera or using overlay mode.
元素在画布上呈现的场景渲染后,从附加的相机或者使用叠加模式。

Variables 变量

cachedSortingLayerValueCached calculated value based upon SortingLayerID.
基于排序层ID的缓存计算值。
isRootCanvasIs this the root Canvas?
是否是根画布?
overridePixelPerfectAllows for nested canvases to override pixelPerfect settings inherited from parent canvases.
允许内置的画布继承父画布的重载像素保真设置。
overrideSortingOverride the sorting of canvas.
重载画布排序。
pixelPerfectForce elements in the canvas to be aligned with pixels. Only applies with renderMode is Screen Space.
强制画布上的元素与像素对其。仅在Screen Space模式下显示。
pixelRectGet the render rect for the Canvas.
获取画布的渲染的矩形。
planeDistanceHow far away from the camera is the Canvas generated.
摄像机到画布产生的距离多少。
referencePixelsPerUnitThe number of pixels per unit that is considered the default.
默认的单位像素的数量。
renderModeIs the Canvas in World or Overlay mode?
画布是在世界中还是重叠模式?
renderOrderThe render order in which the canvas is being emitted to the scene.
场景呈现的渲染画布的顺序。
scaleFactorUsed to scale the entire canvas, while still making it fit the screen. Only applies with renderMode is Screen Space.
用于缩放整个画布,一直适用于屏幕。仅在Screen Space模式下可用。
sortingLayerIDUnique ID of the Canvas' sorting layer.
画布排序层的唯一ID。
sortingLayerNameName of the Canvas' sorting layer.
画布排序层的名称。
sortingOrderCanvas' order within a sorting layer.
画布在排序层里的顺序。
targetDisplayFor Overlay mode, display index on which the UI canvas will appear.
在Overlay模式下,UI画布将会出现显示索引。
worldCameraCamera used for sizing the Canvas when in Screen Space - Camera. Also used as the Camera that events will be sent through for a World Space (Canvas).
在Screen Space - Camera模式下相机用来调整画布的尺寸。也用作发送事件到画布的世界空间。

Static Functions 静态函数

ForceUpdateCanvasesForce all canvases to update their content.
强制更新所有画布的内容。
GetDefaultCanvasMaterialReturns the default material that can be used for rendering normal elements on the Canvas.
返回默认材质,可被用于渲染画布中的正常元素。
script/unityengine/classes/canvas/canvas.txt · 最后更改: 2016/08/02 05:36 (外部编辑)