官术网_书友最值得收藏!

Canvas Renderer component

The Canvas Renderer component is not on a Canvas object but on all other renderable UI objects.

For a UI element to render, it must have a Canvas Renderer component on it. All of renderable UI elements that you create via the Create menu will automatically have this component attached to them. If you try to remove this component, you will see a warning similar to the following:

In the preceding screenshot, I tried to remove the Canvas Render a component from a Text UI object. As you can see, it will not let me remove the Canvas Renderer component, because the Text component relies on it. If I return and remove the text component, I would then be able to remove the Canvas Render a component.

You will note that there are no properties in the Canvas Renderer component that can be edited from within the inspector; however, you can access various properties of it from within scripts.

For further details about properties of the Canvas Renderer that can be accessed through script, refer to  https://docs.unity3d.com/ScriptReference/CanvasRenderer.html.
主站蜘蛛池模板: 布尔津县| 长岛县| 甘南县| 逊克县| 资溪县| 泌阳县| 顺昌县| 夏邑县| 卢龙县| 宽甸| 曲松县| 长丰县| 阳城县| 黎城县| 赫章县| 通州区| 利川市| 霍邱县| 大悟县| 固原市| 咸阳市| 舒兰市| 怀柔区| 库尔勒市| 永州市| 万载县| 阜阳市| 浦北县| 白玉县| 栖霞市| 闽侯县| 安宁市| 香港 | 平度市| 松原市| 包头市| 虎林市| 射阳县| 若羌县| 潜山县| 高台县|