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.
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.
{{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-->
Line 16:
Line 18:
|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|This makes this component only editable in [[Edit Mode]]
|EditModeOnly|Bool|This makes this component only editable in [[Edit Mode]]
|AcceptRemoteTouch|Bool|Makes the canvas accepts laser touches
|IgnoreTouchesFromBehind|Bool|Makes the canvas ignore all touches from behind
|IgnoreTouchesFromBehind|Bool|Makes the canvas ignore all touches from behind
|BlockAllInteractions|Bool|Prevents any interaction if enabled
|BlockAllInteractions|Bool|Prevents any interaction if enabled
Line 36:
Line 38:
<!--T:4-->
<!--T:4-->
== Usage ==
== 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 intractable.
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: