UGUI Workflow
Goal of this chapter: use EasyChart with a UGUI workflow (Canvas/RectTransform), and understand the choice between two rendering modes:
ScreenSpaceOverlay: best visual quality (no RenderTexture), but typically visible only in the Game viewWorldSpace: visible in both Scene/Game views (uses RenderTexture), suitable for 3D world-space UI
1. Recommended approach: UGUIChartBridge
Recommended component: UGUIChartBridge.
Its role is:
- Still uses UI Toolkit
ChartElementas the core chart renderer - Bridges the chart so it “fits” onto a target UGUI
RectTransform
So you get the best of both:
- Chart capability + UI Toolkit rendering
- UGUI scene/prefab layout workflow and habits
2. Common prerequisites
No matter which mode you choose, prepare the following first:
- A
ChartProfileto display (recommended: clone one fromEasyChart/Library Editorand modify it) - A
PanelSettingsasset, and assign it toUGUIChartBridgeviaPanel Settings Asset
Note: providing
Panel Settings Assetis usually better for font rendering and overall stability.
3. Screen Space Overlay (recommended for HUD/panels)
Use cases
- HUD, UI panels, dialogs
- You care most about clarity and visual quality
Characteristics
- No RenderTexture
- Typically visible only in the Game view
Setup steps (overview)
- Create a
Canvas - Under the Canvas, create a node with
RectTransform(Imageor an empty GameObject both work) - Add
UGUIChartBridge - Configure:
ProfilePanel Settings AssetRender Mode = ScreenSpaceOverlaySort Order(controls overlay order; effective only in Screen Space Overlay mode)
Key points:
- This mode renders the chart inside a runtime-created/reused
UIDocument. - If the chart is covered by other UI, increase
Sort Orderfirst.
4. World Space (recommended for 3D world-space panels)
Use cases
- Billboards/screens/panels inside a 3D world
- You want to see the result in the Scene view as well
Characteristics
- Uses RenderTexture
- Usually visible in both Scene and Game views
- Visual quality can be affected by RenderTexture resolution
Setup steps (overview)
- Create a
Canvas - Set
Render Mode = World Space - Under the Canvas, create a node with
RectTransform(recommended:RawImage) - Add
UGUIChartBridge - Configure:
ProfilePanel Settings AssetRender Mode = WorldSpace
Key points:
- World Space mode creates and maintains a
RenderTextureand displays it viaRawImage. - Clarity is strongly tied to the
RenderTextureresolution, which usually comes from the targetRectTransformwidth/height.- If the chart looks blurry, make the target
RectTransformlarger first (e.g. 600x400+).
- If the chart looks blurry, make the target
5. Mode selection (quick conclusion)
-
Prefer ScreenSpaceOverlay when:
- you’re building traditional UI (HUD/panels)
- clarity is your top priority
-
Prefer WorldSpace when:
- your chart needs to appear in a 3D world
- you want it visible in the Scene view
6. Common issues & troubleshooting
-
Not visible at runtime
- Make sure the target
RectTransformsize is not 0 - Make sure
Profileis assigned, and the Profile renders correctly in Library Editor Preview - If fonts look wrong, check whether
Panel Settings Assetis missing
- Make sure the target
-
Blurry chart in World Space mode
- Increase the target
RectTransformsize (this increases RenderTexture resolution) - Avoid frequent aggressive scaling at runtime (may trigger RenderTexture resizing)
- Increase the target
7. Alternative: export as a UGUI Prefab
If your version provides Export UGUI Prefab:
- You can export the Profile to a UGUI prefab and use it directly under a Canvas
- Coverage for interaction/compatibility depends on the exporter version