m →Usage: Fixed funny typo: "Intractable" (Not easily controlled or directed; not docile or manageable; stubborn; obstinate) to "Interactable". We don't want stubborn components. :)
The '''Canvas''' component is the starting point for anything based on [[UIX]]. It provides the bounds of the UI and controls how users can interact with it.
A Canvas is the starting point for anything based on [[UIX]]. It provides the bounds of the UI and controls how users can interact with it.
{{Note|When updating certain things on the canvas, you may need to duplicate the entire [[Slot]] to get the canvas (and any other UIX elements and slots under that canvas) to work again. The specifics for this canvas component that may need to force recalculation are as follows:
* DefaultCulling: Especially for rendering the back side of the canvas.|warning}}
<!--T:3-->
<!--T:3-->
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Size|Float2|The dimensions of the canvas. At normal scale, this is equivalent to meters.
|Size|Float2|The dimensions of the canvas. At normal scale, this is equivalent to meters
|EditModeOnly|Bool|FIXME
|EditModeOnly|Bool|This makes this component only editable in [[Edit Mode]]
|AcceptRemoteTouch|Bool|Makes the canvas accepts laser touches
|_colliderOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true|Internal - Offsets this box collider for this canvas
|StartingOffset|Int|FIXME
|StartingOffset|Int|The visibility order of rendering this canvas (lower number gets drawn over higher numbers)
|StartingMaskDepth|Int|FIXME
|StartingMaskDepth|Int|Masking layer for the canvas
}}
}}
<!--T:4-->
<!--T:4-->
== Behavior ==
== Usage ==
This component is needed for [[UIX]], without it, your other components that relay on UIX, canvas, elements, and [[Type:Rect|rects]] will not work as expected. Using a canvas not only organizes your other components, it renders them and makes them usable and interactable.
<!--T:5-->
<!--T:5-->
== Examples ==
== Examples ==
Here is a video from [[User:ProbablePrime|ProbablePrime]]'s tutorial on canvases:
<youtube>cLtD7uWrduI</youtube>
<!--T:6-->
<!--T:6-->
== Related Components ==
== See Also =
* When a child slot is created when under a [[Slot]] that has a canvas component, the new child slot will automatically create a [[Component:RectTransform|RectTransform]] component.
The Canvas component is the starting point for anything based on UIX. It provides the bounds of the UI and controls how users can interact with it.
When updating certain things on the canvas, you may need to duplicate the entire Slot to get the canvas (and any other UIX elements and slots under that canvas) to work again. The specifics for this canvas component that may need to force recalculation are as follows:
DefaultCulling: Especially for rendering the back side of the canvas.
If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes.
This component is needed for UIX, without it, your other components that relay on UIX, canvas, elements, and rects will not work as expected. Using a canvas not only organizes your other components, it renders them and makes them usable and interactable.
Examples
Here is a video from ProbablePrime's tutorial on canvases: