pub struct Canvas {Show 19 fields
pub m_Camera: PPtr,
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_PixelPerfect: bool,
pub m_RenderMode: i32,
pub m_AdditionalShaderChannelsFlag: Option<i32>,
pub m_Alpha: Option<f32>,
pub m_Normals: Option<bool>,
pub m_OverridePixelPerfect: Option<bool>,
pub m_OverrideSorting: Option<bool>,
pub m_PlaneDistance: Option<f32>,
pub m_PositionUVs: Option<bool>,
pub m_ReceivesEvents: Option<bool>,
pub m_SortingBucketNormalizedSize: Option<f32>,
pub m_SortingLayerID: Option<i64>,
pub m_SortingOrder: Option<i16>,
pub m_TargetDisplay: Option<i8>,
pub m_UpdateRectTransformForStandalone: Option<i32>,
pub m_VertexColorAlwaysGammaSpace: Option<bool>,
}Expand description
Canvas is a class of the Unity engine since version 4.5.0. Exert from Unity’s scripting documentation: 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.
Fields§
§m_Camera: PPtrPPtr<Camera>: (4.5.0 - 2022.3.2f1)
m_Enabled: u8Enabled Behaviours are Updated, disabled Behaviours are not.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (4.5.0 - 2022.3.2f1)
m_PixelPerfect: boolForce elements in the canvas to be aligned with pixels. Only applies with renderMode is Screen Space.
m_RenderMode: i32Is the Canvas in World or Overlay mode?
m_AdditionalShaderChannelsFlag: Option<i32>i32: (5.6.0f1 - 2022.3.2f1)
m_Alpha: Option<f32>f32: (4.5.0 - 4.5.5)
m_Normals: Option<bool>bool: (4.5.0 - 4.5.5)
m_OverridePixelPerfect: Option<bool>Allows for nested canvases to override pixelPerfect settings inherited from parent canvases. bool: (4.6.0 - 2022.3.2f1)
m_OverrideSorting: Option<bool>Override the sorting of canvas. bool: (4.6.0 - 2022.3.2f1)
m_PlaneDistance: Option<f32>How far away from the camera is the Canvas generated. f32: (4.6.0 - 2022.3.2f1)
m_PositionUVs: Option<bool>bool: (4.5.0 - 4.5.5)
m_ReceivesEvents: Option<bool>bool: (4.6.0 - 2022.3.2f1)
m_SortingBucketNormalizedSize: Option<f32>f32: (5.3.4f1 - 2022.3.2f1)
m_SortingLayerID: Option<i64>Unique ID of the Canvas’ sorting layer. u32: (4.6.0 - 4.7.2); i32: (5.0.0f4 - 2022.3.2f1)
m_SortingOrder: Option<i16>Canvas’ order within a sorting layer. i16: (4.6.0 - 2022.3.2f1)
m_TargetDisplay: Option<i8>For Overlay mode, display index on which the UI canvas will appear. i8: (5.3.0f1 - 2022.3.2f1)
m_UpdateRectTransformForStandalone: Option<i32>Should the Canvas size be updated based on the render target when a manual Camera.Render call is performed. i32: (2022.1.0b1 - 2022.3.2f1)
m_VertexColorAlwaysGammaSpace: Option<bool>Should the Canvas vertex color always be in gamma space before passing to the UI shaders in linear color space work flow. bool: (2022.2.15f1 - 2022.3.2f1)